Class GridCoordinatesView

java.lang.Object
org.apache.sis.coverage.grid.GridCoordinatesView

final class GridCoordinatesView extends Object
A view over the low or high grid envelope coordinates. This is not a general-purpose grid coordinates since it assumes a GridExtent coordinates layout.
Upcoming API generalization: this class may implement the GridCoordinates interface in a future Apache SIS version. This is pending GeoAPI update.
Since:
1.0
Version:
1.1
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final long[]
    A reference to the coordinate array of the enclosing grid envelope.
    private final int
    Index of the first value in the coordinates array.
  • Constructor Summary

    Constructors
    Constructor
    Description
    GridCoordinatesView(long[] coordinates, int offset)
    Creates a new view over the low or high coordinates.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    equals(Object object)
    Compares this grid coordinates with the specified object for equality.
    final long
    getCoordinateValue(int index)
    Returns the coordinate value for the specified dimension.
    final long[]
    Returns all coordinate values.
    final int
    Returns the number of dimension.
    final int
    Returns a hash code value for this object.
    final String
    Returns a string representation of this grid coordinates for debugging purpose.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • coordinates

      private final long[] coordinates
      A reference to the coordinate array of the enclosing grid envelope.
    • offset

      private final int offset
      Index of the first value in the coordinates array. This is 0 for low values, or getDimension() for high values.
  • Constructor Details

    • GridCoordinatesView

      GridCoordinatesView(long[] coordinates, int offset)
      Creates a new view over the low or high coordinates.
  • Method Details

    • getDimension

      public final int getDimension()
      Returns the number of dimension.
    • getCoordinateValues

      public final long[] getCoordinateValues()
      Returns all coordinate values.
    • getCoordinateValue

      public final long getCoordinateValue(int index)
      Returns the coordinate value for the specified dimension.
    • toString

      public final String toString()
      Returns a string representation of this grid coordinates for debugging purpose.
      Overrides:
      toString in class Object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object.
      Overrides:
      hashCode in class Object
    • equals

      public final boolean equals(Object object)
      Compares this grid coordinates with the specified object for equality.
      Overrides:
      equals in class Object
      Parameters:
      object - the object to compares with this grid coordinates.
      Returns:
      true if the given object is equal to this grid coordinates.