public abstract class AbstractDirectPosition extends Object implements DirectPosition
toString()
, equals(java.lang.Object)
and hashCode()
methods.
This class do not holds any state. The decision to implement Serializable
or
org.geotools.util.Cloneable
interfaces is left to implementors.
Modifier | Constructor and Description |
---|---|
protected |
AbstractDirectPosition()
Constructs a direct position.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object object)
|
double[] |
getCoordinate()
Returns a sequence of numbers that hold the coordinate of this position in its reference
system.
|
DirectPosition |
getDirectPosition()
Returns always
this , the direct position for this position. |
int |
hashCode()
Returns a hash value for this coordinate.
|
void |
setPosition(DirectPosition position)
Sets this direct position to the given position.
|
String |
toString()
Returns a string representation of this coordinate.
|
getCoordinateReferenceSystem, getDimension, getOrdinate, setOrdinate
protected AbstractDirectPosition()
public DirectPosition getDirectPosition()
this
, the direct position for this position.getDirectPosition
in interface Position
this
).public void setPosition(DirectPosition position)
null
, then
all ordinate values are set to NaN.position
- The new position.public double[] getCoordinate()
getCoordinate
in interface DirectPosition
public String toString()
CoordinateFormat
.public int hashCode()
hashCode
in interface DirectPosition
hashCode
in class Object
public boolean equals(Object object)
equals
in interface DirectPosition
equals
in class Object
object
- The object to compare with this position.true
if the given object is equals to this position.Copyright © 1996–2019 Geotools. All rights reserved.