P - the Position type for the systempublic abstract class CoordinateSystem<P extends Position>
extends java.lang.Object
A coordinate system is characterized by its CoordinateSystemAxes (in order).
| Modifier and Type | Field and Description |
|---|---|
private CoordinateSystemAxis[] |
axes |
| Constructor and Description |
|---|
CoordinateSystem(CoordinateSystemAxis... axes)
Constructs a
CoordinateSystem. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o) |
abstract CoordinateSystem<?> |
extend(CoordinateSystemAxis axis)
Create a new coordinate system with the axes of this system plus the specified axis
|
CoordinateSystemAxis[] |
getAxes()
Returns the
CoordinateSystemAxes of this CoordinateSystem (in order). |
CoordinateSystemAxis |
getAxis(int index)
Returns the
CoordinateSystemAxis at the specified position. |
java.util.List<CoordinateSystemAxisDirection> |
getAxisDirections()
Returns a list of all the directions of this systems
|
CoordinateSystemAxis |
getAxisForComponentIndex(int i)
Return the axis that corresponds to the i-th element in the coordinates for a
Position
in this CoordinateSystem. |
int |
getAxisIndex(CoordinateSystemAxis axis)
Returns the position of the specified
CoordinateSystemAxis in this CoordinateSystem,
or -1 if it is not an axis of this instance. |
java.util.List<java.lang.Integer> |
getAxisNormalOrder()
Returns the normal order value for the axes of this systems in the order that the axes have been defined for this
system.
|
Unit |
getAxisUnit(int index)
Returns the
Unit of the axis at the specified position. |
int |
getCoordinateDimension()
Returns the coordinate dimension, i.e.
|
abstract java.lang.Class<P> |
getPositionClass() |
int |
hashCode() |
abstract CoordinateSystem<?> |
merge(OneDimensionCoordinateSystem<?> coordinateSystem)
Create a coordinate system that merges this instance with the specified system
|
private final CoordinateSystemAxis[] axes
public CoordinateSystem(CoordinateSystemAxis... axes)
CoordinateSystem.
CoordinateSystems are characterized by their CoordinateSystemAxes.
axes - the sequence (at least two) of its CoordinateSystems.java.lang.IllegalArgumentException - when less than two axes are specified, or when an argument is null.public abstract java.lang.Class<P> getPositionClass()
public CoordinateSystemAxis[] getAxes()
CoordinateSystemAxes of this CoordinateSystem (in order).public java.util.List<CoordinateSystemAxisDirection> getAxisDirections()
public java.util.List<java.lang.Integer> getAxisNormalOrder()
public int getCoordinateDimension()
public int getAxisIndex(CoordinateSystemAxis axis)
CoordinateSystemAxis in this CoordinateSystem,
or -1 if it is not an axis of this instance.axis - public CoordinateSystemAxis getAxisForComponentIndex(int i)
Position
in this CoordinateSystem.i - the 0-base index for a coordinatejava.lang.IndexOutOfBoundsException - if i > getCoordinateDimension() - 1public CoordinateSystemAxis getAxis(int index)
CoordinateSystemAxis at the specified position.index - public Unit getAxisUnit(int index)
Unit of the axis at the specified position.index - public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic abstract CoordinateSystem<?> merge(OneDimensionCoordinateSystem<?> coordinateSystem)
coordinateSystem - the system to merge withCoordinateSystemjava.lang.UnsupportedOperationException - if no supported coordinate system can represent the mergepublic abstract CoordinateSystem<?> extend(CoordinateSystemAxis axis)
axis - the additional axisCoordinateSystemjava.lang.UnsupportedOperationException - if no supported coordinate system can contain the axes.