Package ucar.nc2.grib.coord
Class CoordinateRuntime
- java.lang.Object
-
- ucar.nc2.grib.coord.CoordinateRuntime
-
- All Implemented Interfaces:
Coordinate
@Immutable public class CoordinateRuntime extends Object implements Coordinate
Grib runtime coordinate Effectively Immutable- Since:
- 11/24/13
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CoordinateRuntime.Builder1
static class
CoordinateRuntime.Builder2
-
Nested classes/interfaces inherited from interface ucar.nc2.grib.coord.Coordinate
Coordinate.Type
-
-
Constructor Summary
Constructors Constructor Description CoordinateRuntime(List<Long> runtimeSorted, CalendarPeriod timeUnit)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Counters
calcDistributions()
boolean
equals(Object o)
int
estMemorySize()
int
getCode()
CalendarDate
getFirstDate()
int
getIndex(Object val)
CalendarDate
getLastDate()
String
getName()
int
getNCoords()
double
getOffsetInTimeUnits(CalendarDate start)
List<Double>
getOffsetsInTimeUnits()
Get offsets from firstDate, in units of timeUnitString
getPeriodName()
long
getRuntime(int idx)
CalendarDate
getRuntimeDate(int idx)
int
getSize()
CalendarPeriod
getTimeUnits()
Coordinate.Type
getType()
String
getUnit()
Object
getValue(int idx)
List<?>
getValues()
int
hashCode()
void
setName(String name)
void
showCoords(Formatter info)
void
showInfo(Formatter info, Indent indent)
String
toString()
-
-
-
Constructor Detail
-
CoordinateRuntime
public CoordinateRuntime(List<Long> runtimeSorted, CalendarPeriod timeUnit)
-
-
Method Detail
-
getTimeUnits
public CalendarPeriod getTimeUnits()
-
getRuntimeDate
public CalendarDate getRuntimeDate(int idx)
-
getRuntime
public long getRuntime(int idx)
-
getPeriodName
public String getPeriodName()
-
getOffsetsInTimeUnits
public List<Double> getOffsetsInTimeUnits()
Get offsets from firstDate, in units of timeUnit- Returns:
- for each runtime, a list of values from firstdate
-
getOffsetInTimeUnits
public double getOffsetInTimeUnits(CalendarDate start)
-
getSize
public int getSize()
- Specified by:
getSize
in interfaceCoordinate
-
getNCoords
public int getNCoords()
- Specified by:
getNCoords
in interfaceCoordinate
-
getType
public Coordinate.Type getType()
- Specified by:
getType
in interfaceCoordinate
-
estMemorySize
public int estMemorySize()
- Specified by:
estMemorySize
in interfaceCoordinate
-
getUnit
public String getUnit()
- Specified by:
getUnit
in interfaceCoordinate
-
getName
public String getName()
- Specified by:
getName
in interfaceCoordinate
-
setName
public void setName(String name)
-
getCode
public int getCode()
- Specified by:
getCode
in interfaceCoordinate
-
getFirstDate
public CalendarDate getFirstDate()
-
getLastDate
public CalendarDate getLastDate()
-
getValues
public List<?> getValues()
- Specified by:
getValues
in interfaceCoordinate
-
getIndex
public int getIndex(Object val)
- Specified by:
getIndex
in interfaceCoordinate
-
getValue
public Object getValue(int idx)
- Specified by:
getValue
in interfaceCoordinate
-
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
-
-