Package cs1302.tracer.trace
Record Class TraceValue.Reference
java.lang.Object
java.lang.Record
cs1302.tracer.trace.TraceValue.Reference
- Record Components:
uniqueId- The target object ID.
- All Implemented Interfaces:
TraceValue
- Enclosing interface:
TraceValue
A non-null reference.
-
Nested Class Summary
Nested classes/interfaces inherited from interface cs1302.tracer.trace.TraceValue
TraceValue.Collection, TraceValue.Color, TraceValue.Lambda, TraceValue.List, TraceValue.Map, TraceValue.Null, TraceValue.Object, TraceValue.Primitive, TraceValue.Reference, TraceValue.String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.longuniqueId()Returns the value of theuniqueIdrecord component.
-
Constructor Details
-
Reference
public Reference(long uniqueId) Creates an instance of aReferencerecord class.- Parameters:
uniqueId- the value for theuniqueIdrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with '=='. -
uniqueId
public long uniqueId()Returns the value of theuniqueIdrecord component.- Returns:
- the value of the
uniqueIdrecord component
-