Package org.djunits.quantity
Class Direction.Reference
java.lang.Object
org.djunits.quantity.def.AbstractReference<Direction.Reference,Angle>
org.djunits.quantity.Direction.Reference
- All Implemented Interfaces:
org.djutils.base.Identifiable
- Enclosing class:
- Direction
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.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
-