Package ucar.nc2.grid
Class GridAxisInterval
- java.lang.Object
-
- ucar.nc2.grid.GridAxis<CoordInterval>
-
- ucar.nc2.grid.GridAxisInterval
-
- All Implemented Interfaces:
Comparable<GridAxis<CoordInterval>>
,Iterable<CoordInterval>
@Immutable public class GridAxisInterval extends GridAxis<CoordInterval> implements Iterable<CoordInterval>
Interval Grid coordinates.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
GridAxisInterval.Builder<T extends GridAxisInterval.Builder<T>>
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
binarySearch(double want)
Public by accident.static GridAxisInterval.Builder<?>
builder()
Get Builder for this class that allows subclassing.double
getCoordDouble(int index)
The nominal value of the interval, cast to a double.Object
getCoordinate(int index)
The nominal value of the coordinate.CoordInterval
getCoordInterval(int index)
The nominal edges of the coordinate.int
getNominalSize()
Nominal in the sense that it may not match the materialized data array.Range
getSubsetRange()
For subsets, the range in the original axis that constitutes the subset.Iterator<CoordInterval>
iterator()
Optional<GridAxisInterval>
subset(GridSubset params, Formatter errlog)
Create a logically subset of this GridAxis.GridAxisInterval.Builder<?>
toBuilder()
-
Methods inherited from class ucar.nc2.grid.GridAxis
attributes, compareTo, equals, getAxisType, getDependenceType, getDependsOn, getDescription, getName, getResolution, getSpacing, getUnits, hashCode, isInterval, isRegular, toString
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Method Detail
-
getNominalSize
public int getNominalSize()
Description copied from class:GridAxis
Nominal in the sense that it may not match the materialized data array.- Specified by:
getNominalSize
in classGridAxis<CoordInterval>
-
subset
@Nullable public Optional<GridAxisInterval> subset(GridSubset params, Formatter errlog)
Description copied from class:GridAxis
Create a logically subset of this GridAxis.- Specified by:
subset
in classGridAxis<CoordInterval>
-
getSubsetRange
public Range getSubsetRange()
Description copied from class:GridAxis
For subsets, the range in the original axis that constitutes the subset.- Specified by:
getSubsetRange
in classGridAxis<CoordInterval>
-
getCoordInterval
public CoordInterval getCoordInterval(int index)
Description copied from class:GridAxis
The nominal edges of the coordinate.- Specified by:
getCoordInterval
in classGridAxis<CoordInterval>
-
getCoordinate
public Object getCoordinate(int index)
Description copied from class:GridAxis
The nominal value of the coordinate.- Specified by:
getCoordinate
in classGridAxis<CoordInterval>
-
getCoordDouble
public double getCoordDouble(int index)
The nominal value of the interval, cast to a double.- Specified by:
getCoordDouble
in classGridAxis<CoordInterval>
-
iterator
public Iterator<CoordInterval> iterator()
- Specified by:
iterator
in interfaceIterable<CoordInterval>
-
binarySearch
public int binarySearch(double want)
Description copied from class:GridAxis
Public by accident.- Specified by:
binarySearch
in classGridAxis<CoordInterval>
-
toBuilder
public GridAxisInterval.Builder<?> toBuilder()
-
builder
public static GridAxisInterval.Builder<?> builder()
Get Builder for this class that allows subclassing.
-
-