Record Class SelectionAnnotation.ZAdjustedMapData

java.lang.Object
java.lang.Record
org.opentrafficsim.editor.extensions.map.edit.SelectionAnnotation.ZAdjustedMapData
Record Components:
mapData - map data
adjustedZ - adjusted z-value, see DrawLevel for values
All Implemented Interfaces:
nl.tudelft.simulation.dsol.animation.Locatable, OtsShape
Enclosing class:
SelectionAnnotation

public static record SelectionAnnotation.ZAdjustedMapData(MapData mapData, double adjustedZ) extends Record implements OtsShape
Helper class that wraps a MapData and acts like it, except with an adjusted z-value as given.
  • Constructor Details

    • ZAdjustedMapData

      public ZAdjustedMapData(MapData mapData, double adjustedZ)
      Creates an instance of a ZAdjustedMapData record class.
      Parameters:
      mapData - the value for the mapData record component
      adjustedZ - the value for the adjustedZ record component
  • Method Details

    • getZ

      public double getZ()
      Specified by:
      getZ in interface nl.tudelft.simulation.dsol.animation.Locatable
    • getLocation

      public DirectedPoint2d getLocation()
      Specified by:
      getLocation in interface nl.tudelft.simulation.dsol.animation.Locatable
      Specified by:
      getLocation in interface OtsShape
    • getRelativeContour

      public Polygon2d getRelativeContour()
      Specified by:
      getRelativeContour in interface OtsShape
    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      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.
    • mapData

      public MapData mapData()
      Returns the value of the mapData record component.
      Returns:
      the value of the mapData record component
    • adjustedZ

      public double adjustedZ()
      Returns the value of the adjustedZ record component.
      Returns:
      the value of the adjustedZ record component