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

    Constructors
    Constructor
    Description
    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 a TrackModelHolder record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    dev.engine_room.flywheel.lib.model.baked.PartialModel
    Returns the value of the leftSegment record component.
    dev.engine_room.flywheel.lib.model.baked.PartialModel
    Returns the value of the rightSegment record component.
    dev.engine_room.flywheel.lib.model.baked.PartialModel
    tie()
    Returns the value of the tie record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • 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 a TrackModelHolder record class.
      Parameters:
      tie - the value for the tie record component
      leftSegment - the value for the leftSegment record component
      rightSegment - the value for the rightSegment record component
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • tie

      public dev.engine_room.flywheel.lib.model.baked.PartialModel tie()
      Returns the value of the tie record component.
      Returns:
      the value of the tie record component
    • leftSegment

      public dev.engine_room.flywheel.lib.model.baked.PartialModel leftSegment()
      Returns the value of the leftSegment record component.
      Returns:
      the value of the leftSegment record component
    • rightSegment

      public dev.engine_room.flywheel.lib.model.baked.PartialModel rightSegment()
      Returns the value of the rightSegment record component.
      Returns:
      the value of the rightSegment record component