Package org.geotools.coverage.grid
Class GeneralGridCoordinates.Immutable
Object
GeneralGridCoordinates
Immutable
- All Implemented Interfaces:
- Serializable,- Cloneable,- GridCoordinates,- Cloneable
- Enclosing class:
- GeneralGridCoordinates
An immutable 
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.- Since:
- 2.5
- Author:
- Martin Desruisseaux
- See Also:
- 
Nested Class SummaryNested classes/interfaces inherited from class GeneralGridCoordinatesGeneralGridCoordinates.Immutable
- 
Constructor SummaryConstructorsConstructorDescriptionImmutable(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.Immutable(GridCoordinates coordinates) Creates an immutable grid coordinates with the specified values.
- 
Method SummaryModifier and TypeMethodDescriptionclone()Returns a mutable clone of this grid coordinates.voidsetCoordinateValue(int dimension, int value) Do not allows modification of this grid coordinates.Methods inherited from class GeneralGridCoordinatesequals, getCoordinateValue, getCoordinateValues, getDimension, hashCode, toString
- 
Constructor Details- 
Immutablepublic Immutable(int[] coordinates) Creates an immutable grid coordinates with the specified values.- Parameters:
- coordinates- The grid coordinates to copy.
 
- 
Immutablepublic Immutable(int[] coordinates, int lower, int upper) Creates an immutable grid coordinates with the specified values in the specified range.- Parameters:
- coordinates- The coordinates to copy.
- lower- Index of the first value to copy, inclusive.
- upper- Index of the last value to copy, exclusive.
 
- 
ImmutableCreates an immutable grid coordinates with the specified values.- Parameters:
- coordinates- The grid coordinates to copy.
 
 
- 
- 
Method Details- 
setCoordinateValueDo not allows modification of this grid coordinates.- Specified by:
- setCoordinateValuein interface- GridCoordinates
- Overrides:
- setCoordinateValuein class- GeneralGridCoordinates
- Parameters:
- dimension- The index of the value to set.
- value- The new value.
- Throws:
- UnsupportedOperationException- always thrown.
 
- 
cloneReturns a mutable clone of this grid coordinates. The clone is an instance ofGeneralGridCoordinatesrather than thisImmutablesubclass.- Specified by:
- clonein interface- Cloneable
- Overrides:
- clonein class- GeneralGridCoordinates
- Returns:
- A mutable clone of this grid coordinates.
- See Also:
 
 
-