Record Class NetCDFDimensionIndexes.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
ConstructorsConstructorDescriptionRegularTimeAxisLookup(int size, long start, long step) Creates an instance of aRegularTimeAxisLookuprecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.intReturns the index of the axis element exactly matching the provided value.intfirstIndexAfter(Date value, boolean inclusive) Returns the first index whose value is after, or optionally equal to, the provided value.final inthashCode()Returns a hash code value for this object.intlastIndexBefore(Date value, boolean inclusive) Returns the exclusive upper bound index for values before, or optionally equal to, the provided value.intsize()Returns the value of thesizerecord component.longstart()Returns the value of thestartrecord component.longstep()Returns the value of thesteprecord component.final StringtoString()Returns a string representation of this record class.valueAt(int index) Returns the temporal value at the specified axis index.
-
Constructor Details
-
RegularTimeAxisLookup
public RegularTimeAxisLookup(int size, long start, long step) Creates an instance of aRegularTimeAxisLookuprecord class.- Parameters:
size- the value for thesizerecord componentstart- the value for thestartrecord componentstep- the value for thesteprecord component
-
-
Method Details
-
exact
Description copied from interface:NetCDFDimensionIndexes.TimeAxisLookupReturns the index of the axis element exactly matching the provided value.- Specified by:
exactin interfaceNetCDFDimensionIndexes.TimeAxisLookup
-
firstIndexAfter
Description copied from interface:NetCDFDimensionIndexes.TimeAxisLookupReturns the first index whose value is after, or optionally equal to, the provided value.- Specified by:
firstIndexAfterin interfaceNetCDFDimensionIndexes.TimeAxisLookup
-
lastIndexBefore
Description copied from interface:NetCDFDimensionIndexes.TimeAxisLookupReturns the exclusive upper bound index for values before, or optionally equal to, the provided value.- Specified by:
lastIndexBeforein interfaceNetCDFDimensionIndexes.TimeAxisLookup
-
valueAt
Description copied from interface:NetCDFDimensionIndexes.TimeAxisLookupReturns the temporal value at the specified axis index.- Specified by:
valueAtin interfaceNetCDFDimensionIndexes.TimeAxisLookup
-
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. -
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. -
equals
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 '=='. -
size
public int size()Returns the value of thesizerecord component.- Specified by:
sizein interfaceNetCDFDimensionIndexes.AxisLookup- Returns:
- the value of the
sizerecord component
-
start
public long start()Returns the value of thestartrecord component.- Returns:
- the value of the
startrecord component
-
step
public long step()Returns the value of thesteprecord component.- Returns:
- the value of the
steprecord component
-