Record Class NetCDFDimensionIndexes.RegularNumericAxisLookup

Object
Record
RegularNumericAxisLookup
All Implemented Interfaces:
NetCDFDimensionIndexes.AxisLookup, NetCDFDimensionIndexes.NumericAxisLookup
Enclosing class:
NetCDFDimensionIndexes

public static record NetCDFDimensionIndexes.RegularNumericAxisLookup(int size, double start, double step) extends Record implements NetCDFDimensionIndexes.NumericAxisLookup
Regular numeric axis lookup backed by size, start, and step.
  • Constructor Summary

    Constructors
    Constructor
    Description
    RegularNumericAxisLookup(int size, double start, double step)
    Creates an instance of a RegularNumericAxisLookup record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    int
    exact(double value)
    Returns the index of the axis element exactly matching the provided value.
    int
    firstIndexAfter(double value, boolean inclusive)
    Returns the first index whose value is after, or optionally equal to, the provided value.
    final int
    Returns a hash code value for this object.
    int
    lastIndexBefore(double value, boolean inclusive)
    Returns the exclusive upper bound index for values before, or optionally equal to, the provided value.
    int
    Returns the value of the size record component.
    double
    Returns the value of the start record component.
    double
    Returns the value of the step record component.
    final String
    Returns a string representation of this record class.
    double
    valueAt(int index)
    Returns the numeric value at the specified axis index.

    Methods inherited from class Object

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

    • RegularNumericAxisLookup

      public RegularNumericAxisLookup(int size, double start, double step)
      Creates an instance of a RegularNumericAxisLookup record class.
      Parameters:
      size - the value for the size record component
      start - the value for the start record component
      step - the value for the step record component
  • Method Details

    • exact

      public int exact(double value)
      Description copied from interface: NetCDFDimensionIndexes.NumericAxisLookup
      Returns the index of the axis element exactly matching the provided value.
      Specified by:
      exact in interface NetCDFDimensionIndexes.NumericAxisLookup
    • firstIndexAfter

      public int firstIndexAfter(double value, boolean inclusive)
      Description copied from interface: NetCDFDimensionIndexes.NumericAxisLookup
      Returns the first index whose value is after, or optionally equal to, the provided value.
      Specified by:
      firstIndexAfter in interface NetCDFDimensionIndexes.NumericAxisLookup
    • lastIndexBefore

      public int lastIndexBefore(double value, boolean inclusive)
      Description copied from interface: NetCDFDimensionIndexes.NumericAxisLookup
      Returns the exclusive upper bound index for values before, or optionally equal to, the provided value.
      Specified by:
      lastIndexBefore in interface NetCDFDimensionIndexes.NumericAxisLookup
    • valueAt

      public double valueAt(int index)
      Description copied from interface: NetCDFDimensionIndexes.NumericAxisLookup
      Returns the numeric value at the specified axis index.
      Specified by:
      valueAt in interface NetCDFDimensionIndexes.NumericAxisLookup
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • size

      public int size()
      Returns the value of the size record component.
      Specified by:
      size in interface NetCDFDimensionIndexes.AxisLookup
      Returns:
      the value of the size record component
    • start

      public double start()
      Returns the value of the start record component.
      Returns:
      the value of the start record component
    • step

      public double step()
      Returns the value of the step record component.
      Returns:
      the value of the step record component