Package ucar.nc2.grib.coord
Class CoordinateTimeIntv
- java.lang.Object
-
- ucar.nc2.grib.coord.CoordinateTimeAbstract
-
- ucar.nc2.grib.coord.CoordinateTimeIntv
-
- All Implemented Interfaces:
Coordinate
@Immutable public class CoordinateTimeIntv extends CoordinateTimeAbstract implements Coordinate
Time coordinates that are intervals.- Since:
- 11/28/13
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CoordinateTimeIntv.Builder1
static class
CoordinateTimeIntv.Builder2
-
Nested classes/interfaces inherited from interface ucar.nc2.grib.coord.Coordinate
Coordinate.Type
-
-
Field Summary
-
Fields inherited from class ucar.nc2.grib.coord.CoordinateTimeAbstract
cdf, code, MIXED_INTERVALS, name, refDate, time2runtime, timeUnit
-
-
Constructor Summary
Constructors Constructor Description CoordinateTimeIntv(int code, CalendarPeriod timeUnit, CalendarDate refDate, List<TimeCoordIntvValue> timeIntervals, int[] time2runtime)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Counters
calcDistributions()
boolean
equals(Object o)
int
estMemorySize()
int
getIndex(Object val)
int
getSize()
String
getTimeIntervalName()
Check if we all time intervals have the same length.List<TimeCoordIntvValue>
getTimeIntervals()
Coordinate.Type
getType()
Object
getValue(int idx)
List<?>
getValues()
int
hashCode()
protected CoordinateTimeIntv
makeBestFromComplete(int[] best, int n)
CalendarDateRange
makeCalendarDateRange(Calendar cal)
Make calendar date range, using the first and last ending boundsvoid
showCoords(Formatter info)
void
showInfo(Formatter info, Indent indent)
-
Methods inherited from class ucar.nc2.grib.coord.CoordinateTimeAbstract
getCode, getMasterRuntimeIndex, getName, getNCoords, getOffsetInTimeUnits, getRefDate, getTime2runtime, getTimeUdUnit, getTimeUnit, getUnit, makeBestFromComplete, setName, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface ucar.nc2.grib.coord.Coordinate
getCode, getName, getNCoords, getUnit
-
-
-
-
Constructor Detail
-
CoordinateTimeIntv
public CoordinateTimeIntv(int code, CalendarPeriod timeUnit, CalendarDate refDate, List<TimeCoordIntvValue> timeIntervals, int[] time2runtime)
-
-
Method Detail
-
getTimeIntervals
public List<TimeCoordIntvValue> getTimeIntervals()
-
getValues
public List<?> getValues()
- Specified by:
getValues
in interfaceCoordinate
-
getValue
public Object getValue(int idx)
- Specified by:
getValue
in interfaceCoordinate
-
getIndex
public int getIndex(Object val)
- Specified by:
getIndex
in interfaceCoordinate
-
getSize
public int getSize()
- Specified by:
getSize
in interfaceCoordinate
-
estMemorySize
public int estMemorySize()
- Specified by:
estMemorySize
in interfaceCoordinate
-
getType
public Coordinate.Type getType()
- Specified by:
getType
in interfaceCoordinate
-
getTimeIntervalName
public String getTimeIntervalName()
Check if we all time intervals have the same length.- Returns:
- time interval name or MIXED_INTERVALS
-
makeCalendarDateRange
public CalendarDateRange makeCalendarDateRange(Calendar cal)
Make calendar date range, using the first and last ending bounds- Specified by:
makeCalendarDateRange
in classCoordinateTimeAbstract
- Parameters:
cal
- optional calendar, may be null- Returns:
- calendar date range
-
showInfo
public void showInfo(Formatter info, Indent indent)
- Specified by:
showInfo
in interfaceCoordinate
-
showCoords
public void showCoords(Formatter info)
- Specified by:
showCoords
in interfaceCoordinate
-
calcDistributions
public Counters calcDistributions()
- Specified by:
calcDistributions
in interfaceCoordinate
-
makeBestFromComplete
protected CoordinateTimeIntv makeBestFromComplete(int[] best, int n)
- Specified by:
makeBestFromComplete
in classCoordinateTimeAbstract
-
-