Package ucar.nc2.grid
Class GridAxis<T>
- java.lang.Object
-
- ucar.nc2.grid.GridAxis<T>
-
- All Implemented Interfaces:
Comparable<GridAxis<T>>
,Iterable<T>
- Direct Known Subclasses:
GridAxisInterval
,GridAxisPoint
public abstract class GridAxis<T> extends Object implements Comparable<GridAxis<T>>, Iterable<T>
A GridAxis represents a 1D Coordinate Variable used for a Grid.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
GridAxis.Builder<T extends GridAxis.Builder<T>>
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description AttributeContainer
attributes()
The GridAxis attributes.abstract int
binarySearch(double want)
Public by accident.int
compareTo(GridAxis o)
boolean
equals(Object o)
AxisType
getAxisType()
The GridAxis type.abstract double
getCoordDouble(int index)
The nominal value of the coordinate, cast to a double.abstract Object
getCoordinate(int index)
The nominal value of the coordinate.abstract CoordInterval
getCoordInterval(int index)
The nominal edges of the coordinate.GridAxisDependenceType
getDependenceType()
The way that the Axis depends on other axes.List<String>
getDependsOn()
The list of other Axis this one depends on.String
getDescription()
The GridAxis description.String
getName()
The GridAxis name.abstract int
getNominalSize()
Nominal in the sense that it may not match the materialized data array.double
getResolution()
For isRegular, this is also the increment.GridAxisSpacing
getSpacing()
The spacing of the coordinate values.abstract Range
getSubsetRange()
For subsets, the range in the original axis that constitutes the subset.String
getUnits()
The GridAxis units.int
hashCode()
boolean
isInterval()
Is it an interval coordinate?boolean
isRegular()
Is it regularly spaced?abstract Optional<? extends GridAxis<T>>
subset(GridSubset params, Formatter errlog)
Create a logically subset of this GridAxis.String
toString()
-
Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
-
-
-
Method Detail
-
getName
public String getName()
The GridAxis name.
-
getDescription
public String getDescription()
The GridAxis description.
-
getUnits
public String getUnits()
The GridAxis units.
-
getAxisType
public AxisType getAxisType()
The GridAxis type.
-
attributes
public AttributeContainer attributes()
The GridAxis attributes.
-
getSpacing
public GridAxisSpacing getSpacing()
The spacing of the coordinate values.
-
isRegular
public boolean isRegular()
Is it regularly spaced?
-
isInterval
public boolean isInterval()
Is it an interval coordinate?
-
getResolution
public double getResolution()
For isRegular, this is also the increment.
-
getDependenceType
public GridAxisDependenceType getDependenceType()
The way that the Axis depends on other axes.
-
getDependsOn
public List<String> getDependsOn()
The list of other Axis this one depends on. Only used for GridAxisDependenceType.dependent.
-
getNominalSize
public abstract int getNominalSize()
Nominal in the sense that it may not match the materialized data array.
-
getCoordinate
public abstract Object getCoordinate(int index)
The nominal value of the coordinate.
-
getCoordInterval
public abstract CoordInterval getCoordInterval(int index)
The nominal edges of the coordinate.
-
getCoordDouble
public abstract double getCoordDouble(int index)
The nominal value of the coordinate, cast to a double.
-
subset
public abstract Optional<? extends GridAxis<T>> subset(GridSubset params, Formatter errlog)
Create a logically subset of this GridAxis.
-
getSubsetRange
public abstract Range getSubsetRange()
For subsets, the range in the original axis that constitutes the subset.
-
binarySearch
public abstract int binarySearch(double want)
Public by accident.
-
compareTo
public int compareTo(GridAxis o)
- Specified by:
compareTo
in interfaceComparable<T>
-
-