Package org.djunits.quantity
Class Position.Reference
java.lang.Object
org.djunits.quantity.def.AbstractReference<Position.Reference,Length>
org.djunits.quantity.Position.Reference
- All Implemented Interfaces:
org.djutils.base.Identifiable
- Enclosing class:
- Position
The reference class to define a reference point for the position. No references have been defined yet, since there is no
"natural" origin for a position that we can include here. User-defined origins van be easily added and used.
-
Field Summary
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 position.static voidadd(String id, String name, Length offset, Position.Reference offsetReference) Define a new reference point for the position.static Position.ReferenceGet a reference point for the position, 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
-
Constructor Details
-
Reference
Define a new reference point for the position.- 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 position.- Parameters:
id- the idname- the name or explanation
-
-
Method Details
-
add
Define a new reference point for the position.- Parameters:
id- the idname- the name or explanationoffset- the offset w.r.t. the offsetReferenceoffsetReference- the reference to which the offset is relative
-
add
Define a new reference point for the position.- Parameters:
id- the idname- the name or explanation
-
get
Get a reference point for the position, based on its id. Return null when the id could not be found.- Parameters:
id- the id- Returns:
- the PositionReference object
-