|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
ObjectGeneralGridCoordinates
public class GeneralGridCoordinates
Holds the set of grid coordinates that specifies the location of the grid point within the grid.
GridCoordinates2D,
Serialized Form
| coverage/geotk-coverage (download) | View source code for this class |
| Nested Class Summary | |
|---|---|
static class |
GeneralGridCoordinates.Immutable
An immutable GridCoordinates. |
| Constructor Summary | |
|---|---|
GeneralGridCoordinates(GridCoordinates coordinates)
Creates a grid coordinates which is a copy of the specified one. |
|
GeneralGridCoordinates(int dimension)
Creates a grid coordinates of the specified dimension. |
|
GeneralGridCoordinates(int[] coordinates)
Creates a grid coordinates initialized to the specified values. |
|
GeneralGridCoordinates(int[] coordinates,
int lower,
int upper)
Creates a grid coordinates initialized to the specified values in the specified range. |
|
| Method Summary | |
|---|---|
GeneralGridCoordinates |
clone()
Returns a clone of this grid coordinates. |
boolean |
equals(Object object)
Compares this grid coordinates with the specified object for equality. |
int |
getCoordinateValue(int dimension)
Returns the coordinate value at the specified dimension. |
int[] |
getCoordinateValues()
Returns one integer value for each dimension of the grid. |
int |
getDimension()
Returns the number of dimensions. |
int |
hashCode()
Returns a hash code value for this object. |
void |
setCoordinateValue(int dimension,
int value)
Sets the coordinate value at the specified dimension (optional operation). |
String |
toString()
Returns a string representation of this grid coordinates. |
| Methods inherited from class Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public GeneralGridCoordinates(int dimension)
dimension - The number of dimension.public GeneralGridCoordinates(int[] coordinates)
coordinates - The grid coordinates to copy.
public GeneralGridCoordinates(int[] coordinates,
int lower,
int upper)
coordinates - The coordinates to copy.lower - Index of the first value to copy, inclusive.upper - Index of the last value to copy, exclusive.public GeneralGridCoordinates(GridCoordinates coordinates)
coordinates - The grid coordinates to copy.| Method Detail |
|---|
public int getDimension()
getCoordinateValues().length. It is
provided for efficiency.
getDimension in interface GridCoordinatespublic int[] getCoordinateValues()
Grid.getAxisNames(). The value of
a single coordinate shall be the number of offsets from the origin of the grid in the
direction of a specific axis.
getCoordinateValues in interface GridCoordinatesGeneralGridCoordinates object.
public int getCoordinateValue(int dimension)
throws ArrayIndexOutOfBoundsException
getCoordinateValues()[i]. It is provided for
efficiency.
getCoordinateValue in interface GridCoordinatesdimension - The dimension from 0 inclusive to getDimension() exclusive.
ArrayIndexOutOfBoundsException - if the specified dimension is out of bounds.
public void setCoordinateValue(int dimension,
int value)
throws ArrayIndexOutOfBoundsException,
UnsupportedOperationException
setCoordinateValue in interface GridCoordinatesdimension - The index of the value to set.value - The new value.
ArrayIndexOutOfBoundsException - if the specified dimension is out of bounds.
UnsupportedOperationException - if this grid coordinates is not modifiable.public String toString()
toString in class Objectpublic int hashCode()
hashCode in class Objectpublic boolean equals(Object object)
equals in class Objectobject - The object to compares with this grid coordinates.
true if the given object is equal to this grid coordinates.public GeneralGridCoordinates clone()
clone in class ObjectObject.clone()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||