Package ucar.nc2.grib.coord
Class CoordinateTimeAbstract
- java.lang.Object
-
- ucar.nc2.grib.coord.CoordinateTimeAbstract
-
- All Implemented Interfaces:
Coordinate
- Direct Known Subclasses:
CoordinateTime,CoordinateTime2D,CoordinateTimeIntv
@Immutable public abstract class CoordinateTimeAbstract extends Object implements Coordinate
Abstract superclass for time coordinates ( time, timeIntv, time2D) Effectively Immutable- Since:
- 1/23/14
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface ucar.nc2.grib.coord.Coordinate
Coordinate.Type
-
-
Field Summary
Fields Modifier and Type Field Description static CalendarDateFactorycdfprotected intcodestatic StringMIXED_INTERVALSprotected Stringnameprotected ucar.nc2.time.CalendarDaterefDateprotected int[]time2runtimeprotected ucar.nc2.time.CalendarPeriodtimeUnit
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description intgetCode()intgetMasterRuntimeIndex(int timeIdx)StringgetName()intgetNCoords()doublegetOffsetInTimeUnits(ucar.nc2.time.CalendarDate start)ucar.nc2.time.CalendarDategetRefDate()int[]getTime2runtime()StringgetTimeUdUnit()ucar.nc2.time.CalendarPeriodgetTimeUnit()StringgetUnit()CoordinateTimeAbstractmakeBestFromComplete()Implements coverting a "complete best" to a "monotonic best".protected abstract CoordinateTimeAbstractmakeBestFromComplete(int[] best, int n)abstract ucar.nc2.time.CalendarDateRangemakeCalendarDateRange(ucar.nc2.time.Calendar cal)voidsetName(String name)StringtoString()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface ucar.nc2.grib.coord.Coordinate
calcDistributions, estMemorySize, getIndex, getSize, getType, getValue, getValues, showCoords, showInfo
-
-
-
-
Field Detail
-
MIXED_INTERVALS
public static final String MIXED_INTERVALS
- See Also:
- Constant Field Values
-
cdf
public static CalendarDateFactory cdf
-
code
protected final int code
-
timeUnit
protected final ucar.nc2.time.CalendarPeriod timeUnit
-
refDate
protected final ucar.nc2.time.CalendarDate refDate
-
time2runtime
protected final int[] time2runtime
-
name
protected String name
-
-
Method Detail
-
getCode
public int getCode()
- Specified by:
getCodein interfaceCoordinate
-
getUnit
public String getUnit()
- Specified by:
getUnitin interfaceCoordinate
-
getTimeUdUnit
public String getTimeUdUnit()
-
getName
public String getName()
- Specified by:
getNamein interfaceCoordinate
-
setName
public void setName(String name)
-
getRefDate
public ucar.nc2.time.CalendarDate getRefDate()
-
getTimeUnit
public ucar.nc2.time.CalendarPeriod getTimeUnit()
-
getTime2runtime
public int[] getTime2runtime()
-
getMasterRuntimeIndex
public int getMasterRuntimeIndex(int timeIdx)
-
getNCoords
public int getNCoords()
- Specified by:
getNCoordsin interfaceCoordinate
-
getOffsetInTimeUnits
public double getOffsetInTimeUnits(ucar.nc2.time.CalendarDate start)
-
makeBestFromComplete
public CoordinateTimeAbstract makeBestFromComplete()
Implements coverting a "complete best" to a "monotonic best". The reftime is not allowed to decrease- Returns:
- "monotonic best" CoordinateTimeAbstract, based on this one, which is a "complete best"
-
makeBestFromComplete
protected abstract CoordinateTimeAbstract makeBestFromComplete(int[] best, int n)
-
makeCalendarDateRange
public abstract ucar.nc2.time.CalendarDateRange makeCalendarDateRange(ucar.nc2.time.Calendar cal)
-
-