Record Class TrackMaterial.TrackModelHolder
java.lang.Object
java.lang.Record
com.simibubi.create.content.trains.track.TrackMaterial.TrackModelHolder
- Enclosing class:
TrackMaterial
public static record TrackMaterial.TrackModelHolder(dev.engine_room.flywheel.lib.model.baked.PartialModel tie, dev.engine_room.flywheel.lib.model.baked.PartialModel leftSegment, dev.engine_room.flywheel.lib.model.baked.PartialModel rightSegment)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionTrackModelHolder(dev.engine_room.flywheel.lib.model.baked.PartialModel tie, dev.engine_room.flywheel.lib.model.baked.PartialModel leftSegment, dev.engine_room.flywheel.lib.model.baked.PartialModel rightSegment) Creates an instance of aTrackModelHolderrecord 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.dev.engine_room.flywheel.lib.model.baked.PartialModelReturns the value of theleftSegmentrecord component.dev.engine_room.flywheel.lib.model.baked.PartialModelReturns the value of therightSegmentrecord component.dev.engine_room.flywheel.lib.model.baked.PartialModeltie()Returns the value of thetierecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
TrackModelHolder
public TrackModelHolder(dev.engine_room.flywheel.lib.model.baked.PartialModel tie, dev.engine_room.flywheel.lib.model.baked.PartialModel leftSegment, dev.engine_room.flywheel.lib.model.baked.PartialModel rightSegment) Creates an instance of aTrackModelHolderrecord class.- Parameters:
tie- the value for thetierecord componentleftSegment- the value for theleftSegmentrecord componentrightSegment- the value for therightSegmentrecord 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 withObjects::equals(Object,Object). -
tie
public dev.engine_room.flywheel.lib.model.baked.PartialModel tie()Returns the value of thetierecord component.- Returns:
- the value of the
tierecord component
-
leftSegment
public dev.engine_room.flywheel.lib.model.baked.PartialModel leftSegment()Returns the value of theleftSegmentrecord component.- Returns:
- the value of the
leftSegmentrecord component
-
rightSegment
public dev.engine_room.flywheel.lib.model.baked.PartialModel rightSegment()Returns the value of therightSegmentrecord component.- Returns:
- the value of the
rightSegmentrecord component
-