public static final class GeneralGridCoordinates.Immutable extends GeneralGridCoordinates
GridCoordinates
. This is sometime useful for creating a single instance
to be shared by many objects without the cost of cloning. This class is final in order to
prevent subclasses from making it mutable again.GeneralGridCoordinates.Immutable
Constructor and Description |
---|
Immutable(GridCoordinates coordinates)
Creates an immutable grid coordinates with the specified values.
|
Immutable(int[] coordinates)
Creates an immutable grid coordinates with the specified values.
|
Immutable(int[] coordinates,
int lower,
int upper)
Creates an immutable grid coordinates with the specified values in the specified range.
|
Modifier and Type | Method and Description |
---|---|
GeneralGridCoordinates |
clone()
Returns a mutable clone of this grid coordinates.
|
void |
setCoordinateValue(int dimension,
int value)
Do not allows modification of this grid coordinates.
|
equals, getCoordinateValue, getCoordinateValues, getDimension, hashCode, toString
public Immutable(int[] coordinates)
coordinates
- The grid coordinates to copy.public Immutable(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 Immutable(GridCoordinates coordinates)
coordinates
- The grid coordinates to copy.public void setCoordinateValue(int dimension, int value) throws UnsupportedOperationException
setCoordinateValue
in interface GridCoordinates
setCoordinateValue
in class GeneralGridCoordinates
dimension
- The index of the value to set.value
- The new value.UnsupportedOperationException
- always thrown.public GeneralGridCoordinates clone()
GeneralGridCoordinates
rather than this Immutable
subclass.clone
in class GeneralGridCoordinates
Object.clone()
Copyright © 1996–2019 Geotools. All rights reserved.