Record Class NetCDFDimensionIndexes.RegularTimeAxisLookup

Object
Record
RegularTimeAxisLookup
All Implemented Interfaces:
NetCDFDimensionIndexes.AxisLookup, NetCDFDimensionIndexes.TimeAxisLookup
Enclosing class:
NetCDFDimensionIndexes

public static record NetCDFDimensionIndexes.RegularTimeAxisLookup(int size, long start, long step) extends Record implements NetCDFDimensionIndexes.TimeAxisLookup
Regular time axis lookup backed by size, start, and step.
  • Constructor Summary

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

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    int
    exact(Date value)
    Returns the index of the axis element exactly matching the provided value.
    int
    firstIndexAfter(Date 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(Date 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.
    long
    Returns the value of the start record component.
    long
    Returns the value of the step record component.
    final String
    Returns a string representation of this record class.
    valueAt(int index)
    Returns the temporal value at the specified axis index.

    Methods inherited from class Object

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

    • RegularTimeAxisLookup

      public RegularTimeAxisLookup(int size, long start, long step)
      Creates an instance of a RegularTimeAxisLookup 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(Date value)
      Description copied from interface: NetCDFDimensionIndexes.TimeAxisLookup
      Returns the index of the axis element exactly matching the provided value.
      Specified by:
      exact in interface NetCDFDimensionIndexes.TimeAxisLookup
    • firstIndexAfter

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

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

      public Date valueAt(int index)
      Description copied from interface: NetCDFDimensionIndexes.TimeAxisLookup
      Returns the temporal value at the specified axis index.
      Specified by:
      valueAt in interface NetCDFDimensionIndexes.TimeAxisLookup
    • 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 long start()
      Returns the value of the start record component.
      Returns:
      the value of the start record component
    • step

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