Package org.opentrafficsim.base.geometry
Record Class FractionalProjectionHelper.DirectionKey
java.lang.Object
java.lang.Record
org.opentrafficsim.base.geometry.FractionalProjectionHelper.DirectionKey
- Record Components:
start- start directionend- end direction
- Enclosing class:
- FractionalProjectionHelper
public static record FractionalProjectionHelper.DirectionKey(Double start, Double end)
extends Record
Cache key for directions (normalized angles; nulls allowed).
-
Constructor Summary
ConstructorsConstructorDescriptionDirectionKey(Double start, Double end) Creates an instance of aDirectionKeyrecord class. -
Method Summary
Modifier and TypeMethodDescriptionend()Returns the value of theendrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.of(org.djunits.value.vdouble.scalar.Direction start, org.djunits.value.vdouble.scalar.Direction end) Create key with normalized directions, which may benull.start()Returns the value of thestartrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Method Details
-
of
public static FractionalProjectionHelper.DirectionKey of(org.djunits.value.vdouble.scalar.Direction start, org.djunits.value.vdouble.scalar.Direction end) Create key with normalized directions, which may benull.- Parameters:
start- start directionend- end direction- Returns:
- key
-
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). -
start
Returns the value of thestartrecord component.- Returns:
- the value of the
startrecord component
-
end
Returns the value of theendrecord component.- Returns:
- the value of the
endrecord component
-