Package cs1302.tracer.trace
Record Class TraceValue.List
java.lang.Object
java.lang.Record
cs1302.tracer.trace.TraceValue.List
- Record Components:
typeName- List type name.value- List elements.
- All Implemented Interfaces:
TraceValue
- Enclosing interface:
TraceValue
public static record TraceValue.List(String typeName, List<? extends TraceValue> value)
extends Record
implements TraceValue
An object that implements
List, or an array.-
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
ConstructorsConstructorDescriptionList(String typeName, List<? extends TraceValue> value) Creates an instance of aListrecord class. -
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.typeName()Returns the value of thetypeNamerecord component.List<? extends TraceValue> value()Returns the value of thevaluerecord component.
-
Constructor Details
-
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 withObjects::equals(Object,Object). -
typeName
Returns the value of thetypeNamerecord component.- Returns:
- the value of the
typeNamerecord component
-
value
Returns the value of thevaluerecord component.- Returns:
- the value of the
valuerecord component
-