Record Class NetCDFDimensionIndexes.ArrayNumericAxisLookup
- All Implemented Interfaces:
NetCDFDimensionIndexes.AxisLookup,NetCDFDimensionIndexes.NumericAxisLookup
- Enclosing class:
- NetCDFDimensionIndexes
public static record NetCDFDimensionIndexes.ArrayNumericAxisLookup(double[] values)
extends Record
implements NetCDFDimensionIndexes.NumericAxisLookup
Array-backed numeric lookup for irregular numeric axes.
-
Constructor Summary
ConstructorsConstructorDescriptionArrayNumericAxisLookup(double[] values) Builds a numeric lookup backed by explicit axis values. -
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 number of values available on the axis.final StringtoString()Returns a string representation of this record class.doublevalueAt(int index) Returns the numeric value at the specified axis index.double[]values()Returns the value of thevaluesrecord component.
-
Constructor Details
-
ArrayNumericAxisLookup
public ArrayNumericAxisLookup(double[] values) Builds a numeric lookup backed by explicit axis values.
-
-
Method Details
-
size
public int size()Description copied from interface:NetCDFDimensionIndexes.AxisLookupReturns the number of values available on the axis.- Specified by:
sizein interfaceNetCDFDimensionIndexes.AxisLookup
-
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 withObjects::equals(Object,Object). -
values
public double[] values()Returns the value of thevaluesrecord component.- Returns:
- the value of the
valuesrecord component
-