Package org.djunits.quantity
Class Direction.Reference
java.lang.Object
org.djunits.quantity.def.AbstractReference<Direction.Reference,Direction,Angle>
org.djunits.quantity.Direction.Reference
- All Implemented Interfaces:
Reference<Direction.Reference,,Direction, Angle> org.djutils.base.Identifiable
- Enclosing class:
- Direction
public static final class Direction.Reference
extends AbstractReference<Direction.Reference,Direction,Angle>
The reference class to define a reference point for the direction.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Direction.ReferenceEast is zero.static final Direction.ReferenceNorth is zero.Fields inherited from class org.djunits.quantity.def.AbstractReference
REFERENCES -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidDefine a new reference point for the direction.static voidadd(String id, String name, Angle offset, Direction.Reference offsetReference) Define a new reference point for the direction.static Direction.ReferenceGet a reference point for the direction, based on its id.instantiate(Angle angle) Return a strongly typed absolute quantity belonging to this reference.Methods inherited from class org.djunits.quantity.def.AbstractReference
containsId, equals, get, getId, getName, getOffset, getOffsetReference, getReferenceMap, hashCode, mapFor, snapshotMap, toString, unregister
-
Field Details
-
EAST
East is zero. -
NORTH
North is zero.
-
-
Constructor Details
-
Reference
Define a new reference point for the direction.- Parameters:
id- the idname- the name or explanationoffset- the offset w.r.t. the offsetReferenceoffsetReference- the reference to which the offset is relative
-
Reference
Define a new reference point for the direction.- Parameters:
id- the idname- the name or explanationoffset- the offset w.r.t. EAST
-
-
Method Details
-
add
Define a new reference point for the direction.- Parameters:
id- the idname- the name or explanationoffset- the offset w.r.t. offsetReferenceoffsetReference- the reference to which the offset is relative
-
add
Define a new reference point for the direction.- Parameters:
id- the idname- the name or explanationoffset- the offset w.r.t. EAST
-
get
Get a reference point for the direction, based on its id. Return null when the id could not be found.- Parameters:
id- the id- Returns:
- the DirectionReference object
-
instantiate
Description copied from class:AbstractReferenceReturn a strongly typed absolute quantity belonging to this reference.- Specified by:
instantiatein interfaceReference<Direction.Reference,Direction, Angle> - Specified by:
instantiatein classAbstractReference<Direction.Reference,Direction, Angle> - Parameters:
angle- the relative quantity that indicates the 'distance' to this reference point- Returns:
- a strongly typed absolute quantity belonging to this reference
-