Class GeneralGridCoordinates.Immutable

All Implemented Interfaces:
Serializable, Cloneable, GridCoordinates, Cloneable
Enclosing class:
GeneralGridCoordinates

public static final class GeneralGridCoordinates.Immutable extends 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:
  • Constructor Details

    • Immutable

      public Immutable(int[] coordinates)
      Creates an immutable grid coordinates with the specified values.
      Parameters:
      coordinates - The grid coordinates to copy.
    • Immutable

      public 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.
    • Immutable

      public Immutable(GridCoordinates coordinates)
      Creates an immutable grid coordinates with the specified values.
      Parameters:
      coordinates - The grid coordinates to copy.
  • Method Details