Package ucar.nc2.grid
Class GridAxisPoint.Builder<T extends GridAxisPoint.Builder<T>>
- java.lang.Object
-
- ucar.nc2.grid.GridAxis.Builder<T>
-
- ucar.nc2.grid.GridAxisPoint.Builder<T>
-
- Enclosing class:
- GridAxisPoint
public abstract static class GridAxisPoint.Builder<T extends GridAxisPoint.Builder<T>> extends GridAxis.Builder<T>
-
-
Field Summary
Fields Modifier and Type Field Description double[]
edges
double
startValue
double[]
values
-
Fields inherited from class ucar.nc2.grid.GridAxis.Builder
axisType
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GridAxisPoint
build()
T
changeUnits(double factor)
Change the value units by the given scale factor.T
scaleValues(double factor)
Multiply the values by the given scale factorT
setEdges(double[] edges)
Spacing.nominalPoint: pts[ncoords+1]T
setNcoords(int ncoords)
T
setRange(Range range)
T
setRegular(int ncoords, double startValue, double increment)
Only used when spacing.regularPoint.T
setSpacing(GridAxisSpacing spacing)
T
setStartValue(double startValue)
T
setValues(double[] values)
Spacing.regularXXX: not used Spacing.irregularPoint: pts[ncoords] Spacing.nominalPoint: pts[ncoords]T
setValues(List<Number> values)
T
subsetWithRange(Range range)
Subset with given range.T
subsetWithSingleValue(double startValue, Range range)
T
subsetWithStride(int stride)
Subset with stride > 1; Turns into a nominalPoint.-
Methods inherited from class ucar.nc2.grid.GridAxis.Builder
addAttribute, setAttributes, setAxisType, setDependenceType, setDependsOn, setDependsOn, setDescription, setIsSubset, setName, setResolution, setUnits, toString
-
-
-
-
Method Detail
-
setNcoords
public T setNcoords(int ncoords)
-
setStartValue
public T setStartValue(double startValue)
-
setValues
public T setValues(double[] values)
Spacing.regularXXX: not used Spacing.irregularPoint: pts[ncoords] Spacing.nominalPoint: pts[ncoords]
-
setEdges
public T setEdges(@Nullable double[] edges)
Spacing.nominalPoint: pts[ncoords+1]
-
setRegular
public T setRegular(int ncoords, double startValue, double increment)
Only used when spacing.regularPoint. end = start + (ncoords - 1) * increment.
-
setSpacing
public T setSpacing(GridAxisSpacing spacing)
- Overrides:
setSpacing
in classGridAxis.Builder<T extends GridAxisPoint.Builder<T>>
-
changeUnits
public T changeUnits(double factor)
Change the value units by the given scale factor.
-
scaleValues
public T scaleValues(double factor)
Multiply the values by the given scale factor
-
subsetWithStride
public T subsetWithStride(int stride)
Subset with stride > 1; Turns into a nominalPoint.
-
subsetWithRange
public T subsetWithRange(Range range)
Subset with given range. If stride > 1, turns into a nominalPoint.
-
build
public GridAxisPoint build()
-
-