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 CalendarDateFactory
cdf
protected int
code
static String
MIXED_INTERVALS
protected String
name
protected CalendarDate
refDate
protected int[]
time2runtime
protected CalendarPeriod
timeUnit
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description int
getCode()
int
getMasterRuntimeIndex(int timeIdx)
String
getName()
int
getNCoords()
double
getOffsetInTimeUnits(CalendarDate start)
CalendarDate
getRefDate()
int[]
getTime2runtime()
String
getTimeUdUnit()
CalendarPeriod
getTimeUnit()
String
getUnit()
CoordinateTimeAbstract
makeBestFromComplete()
Implements coverting a "complete best" to a "monotonic best".protected abstract CoordinateTimeAbstract
makeBestFromComplete(int[] best, int n)
abstract CalendarDateRange
makeCalendarDateRange(Calendar cal)
void
setName(String name)
String
toString()
-
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 CalendarPeriod timeUnit
-
refDate
protected final CalendarDate refDate
-
time2runtime
protected final int[] time2runtime
-
name
protected String name
-
-
Method Detail
-
getCode
public int getCode()
- Specified by:
getCode
in interfaceCoordinate
-
getUnit
public String getUnit()
- Specified by:
getUnit
in interfaceCoordinate
-
getTimeUdUnit
public String getTimeUdUnit()
-
getName
public String getName()
- Specified by:
getName
in interfaceCoordinate
-
setName
public void setName(String name)
-
getRefDate
public CalendarDate getRefDate()
-
getTimeUnit
public CalendarPeriod getTimeUnit()
-
getTime2runtime
public int[] getTime2runtime()
-
getMasterRuntimeIndex
public int getMasterRuntimeIndex(int timeIdx)
-
getNCoords
public int getNCoords()
- Specified by:
getNCoords
in interfaceCoordinate
-
getOffsetInTimeUnits
public double getOffsetInTimeUnits(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 CalendarDateRange makeCalendarDateRange(Calendar cal)
-
-