|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
ObjectAbstractEnvelope
ImmutableEnvelope
@Immutable public final class ImmutableEnvelope
Immutable representation of an envelope. This class is final in order to ensure that the immutability contract can not be broken (assuming not using Java Native Interface or reflections).
| referencing/geotk-referencing (download) | View source code for this class |
| Constructor Summary | |
|---|---|
ImmutableEnvelope(CoordinateReferenceSystem crs,
double xmin,
double xmax,
double ymin,
double ymax)
Builds a two-dimensional envelope with the specified bounds. |
|
ImmutableEnvelope(Envelope envelope)
Creates an immutable envelope with the values of the given envelope. |
|
| Method Summary | |
|---|---|
CoordinateReferenceSystem |
getCoordinateReferenceSystem()
Returns the envelope coordinate reference system, or null if unknown. |
int |
getDimension()
The length of coordinate sequence (the number of entries) in this envelope. |
double |
getMaximum(int dimension)
Returns the maximal ordinate along the specified dimension. |
double |
getMedian(int dimension)
Returns the median ordinate along the specified dimension. |
double |
getMinimum(int dimension)
Returns the minimal ordinate along the specified dimension. |
double |
getSpan(int dimension)
Returns the envelope span (typically width or height) along the specified dimension. |
| Methods inherited from class AbstractEnvelope |
|---|
equals, equals, getLowerCorner, getUpperCorner, hashCode, toPolygonString, toString, toString |
| Methods inherited from class Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ImmutableEnvelope(Envelope envelope)
envelope - The envelope to copy.
public ImmutableEnvelope(CoordinateReferenceSystem crs,
double xmin,
double xmax,
double ymin,
double ymax)
crs - The coordinate reference system, or null if none.xmin - The minimal value for the first ordinate.xmax - The maximal value for the first ordinate.ymin - The minimal value for the second ordinate.ymax - The maximal value for the second ordinate.| Method Detail |
|---|
public CoordinateReferenceSystem getCoordinateReferenceSystem()
null if unknown.
public int getDimension()
public double getMinimum(int dimension)
throws IndexOutOfBoundsException
IndexOutOfBoundsException - If the given index is out of bounds.
public double getMaximum(int dimension)
throws IndexOutOfBoundsException
IndexOutOfBoundsException - If the given index is out of bounds.
public double getMedian(int dimension)
throws IndexOutOfBoundsException
IndexOutOfBoundsException - If the given index is out of bounds.
public double getSpan(int dimension)
throws IndexOutOfBoundsException
IndexOutOfBoundsException - If the given index is out of bounds.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||