|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.deegree_impl.model.pt.CoordinatePoint
A position defined by a list of numbers. The ordinate
values are indexed from 0
to (numDim-1)
,
where numDim
is the dimension of the coordinate system
the coordinate point belongs in.
PT_CoordinatePoint
,
Point2D
,
Serialized FormField Summary | |
double[] |
ord
The ordinates of the coordinate point. |
private static long |
serialVersionUID
Serial number for interoperability with different versions. |
Constructor Summary | |
CoordinatePoint(double[] ord)
Construct a coordinate with the specified ordinates. |
|
CoordinatePoint(double x,
double y)
Construct a 2D coordinate from the specified ordinates. |
|
CoordinatePoint(double x,
double y,
double z)
Construct a 3D coordinate from the specified ordinates. |
|
CoordinatePoint(int numDim)
Construct a coordinate with the specified number of dimensions. |
|
CoordinatePoint(java.awt.geom.Point2D point)
Construct a coordinate from the specified Point2D . |
Method Summary | |
java.lang.Object |
clone()
Returns a deep copy of this coordinate. |
(package private) void |
ensureDimensionMatch(int expectedDimension)
Convenience method for checking the point's dimension validity. |
boolean |
equals(java.lang.Object object)
Compares the specified object with this coordinate for equality. |
int |
getDimension()
The number of ordinates of a CoordinatePoint .
|
double |
getOrdinate(int dimension)
Returns the ordinate value along the specified dimension. |
int |
hashCode()
Returns a hash value for this coordinate. |
(package private) static int |
hashCode(double[] ord)
Returns a hash value for the specified ordinates. |
java.awt.geom.Point2D |
toPoint2D()
Returns a Point2D with the same coordinate
as this CoordinatePoint . |
java.lang.String |
toString()
Returns a string representation of this coordinate. |
(package private) static java.lang.String |
toString(java.lang.Object owner,
double[] ord)
Returns a string representation of an object. |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
private static final long serialVersionUID
public final double[] ord
PT_CoordinatePoint.ord
Constructor Detail |
public CoordinatePoint(int numDim) throws java.lang.NegativeArraySizeException
numDim
- Number of dimensions.
java.lang.NegativeArraySizeException
- if numDim
is negative.public CoordinatePoint(double[] ord)
ord
array will be copied.
public CoordinatePoint(double x, double y)
public CoordinatePoint(double x, double y, double z)
public CoordinatePoint(java.awt.geom.Point2D point)
Point2D
.
Method Detail |
public final double getOrdinate(int dimension)
ord
[dimension]
.
public final int getDimension()
CoordinatePoint
.
This is equivalent to ord
.length
.
getDimension
in interface Dimensioned
final void ensureDimensionMatch(int expectedDimension) throws MismatchedDimensionException
expectedDimension
- Expected dimension for this point.
MismatchedDimensionException
- if this point doesn't have the expected dimension.public java.awt.geom.Point2D toPoint2D() throws java.lang.IllegalStateException
Point2D
with the same coordinate
as this CoordinatePoint
. This is a
convenience method for interoperability with Java2D.
java.lang.IllegalStateException
- if this coordinate point is not two-dimensional.public int hashCode()
static int hashCode(double[] ord)
public boolean equals(java.lang.Object object)
public java.lang.Object clone()
public java.lang.String toString()
static java.lang.String toString(java.lang.Object owner, double[] ord)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |