Record Class NetCDFDimensionIndexes.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
ConstructorsConstructorDescriptionRegularNumericAxisLookup(int size, double start, double step) Creates an instance of aRegularNumericAxisLookuprecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.intexact(double value) Returns the index of the axis element exactly matching the provided value.intfirstIndexAfter(double 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(double 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.doublestart()Returns the value of thestartrecord component.doublestep()Returns the value of thesteprecord component.final StringtoString()Returns a string representation of this record class.doublevalueAt(int index) Returns the numeric value at the specified axis index.
-
Constructor Details
-
RegularNumericAxisLookup
public RegularNumericAxisLookup(int size, double start, double step) Creates an instance of aRegularNumericAxisLookuprecord class.- Parameters:
size- the value for thesizerecord componentstart- the value for thestartrecord componentstep- the value for thesteprecord component
-
-
Method Details
-
exact
public int exact(double value) Description copied from interface:NetCDFDimensionIndexes.NumericAxisLookupReturns the index of the axis element exactly matching the provided value.- Specified by:
exactin interfaceNetCDFDimensionIndexes.NumericAxisLookup
-
firstIndexAfter
public int firstIndexAfter(double value, boolean inclusive) Description copied from interface:NetCDFDimensionIndexes.NumericAxisLookupReturns the first index whose value is after, or optionally equal to, the provided value.- Specified by:
firstIndexAfterin interfaceNetCDFDimensionIndexes.NumericAxisLookup
-
lastIndexBefore
public int lastIndexBefore(double value, boolean inclusive) Description copied from interface:NetCDFDimensionIndexes.NumericAxisLookupReturns the exclusive upper bound index for values before, or optionally equal to, the provided value.- Specified by:
lastIndexBeforein interfaceNetCDFDimensionIndexes.NumericAxisLookup
-
valueAt
public double valueAt(int index) Description copied from interface:NetCDFDimensionIndexes.NumericAxisLookupReturns the numeric value at the specified axis index.- Specified by:
valueAtin interfaceNetCDFDimensionIndexes.NumericAxisLookup
-
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 double start()Returns the value of thestartrecord component.- Returns:
- the value of the
startrecord component
-
step
public double step()Returns the value of thesteprecord component.- Returns:
- the value of the
steprecord component
-