|
deegree 2.1 (2007/11/08 09:57 build-328-official) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.deegree.model.csct.pt.CoordinatePoint
public class 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.
Point2D
,
Serialized FormField Summary | |
---|---|
double[] |
ord
The ordinates of the coordinate point. |
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(Point2D point)
Construct a coordinate from the specified Point2D . |
Method Summary | |
---|---|
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(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. |
Point2D |
toPoint2D()
Returns a Point2D with the same coordinate
as this CoordinatePoint . |
String |
toString()
Returns a string representation of this coordinate. |
(package private) static String |
toString(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 |
---|
public final double[] ord
Constructor Detail |
---|
public CoordinatePoint(int numDim) throws NegativeArraySizeException
numDim
- Number of dimensions.
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(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 Point2D toPoint2D() throws IllegalStateException
Point2D
with the same coordinate
as this CoordinatePoint
. This is a
convenience method for interoperability with Java2D.
IllegalStateException
- if this coordinate point is not two-dimensional.public int hashCode()
hashCode
in class Object
static int hashCode(double[] ord)
public boolean equals(Object object)
equals
in class Object
public Object clone()
clone
in class Object
public String toString()
toString
in class Object
static String toString(Object owner, double[] ord)
|
deegree 2.1 (2007/11/08 09:57 build-328-official) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://deegree.sourceforge.net