public class CoordinateTime2D extends CoordinateTimeAbstract implements Coordinate
| Modifier and Type | Class and Description |
|---|---|
static class |
CoordinateTime2D.Builder1 |
static class |
CoordinateTime2D.Builder2 |
static class |
CoordinateTime2D.Time2D |
Coordinate.Typecode, MIXED_INTERVALS, name, periodName, refDate, timeUnit| Constructor and Description |
|---|
CoordinateTime2D(int code,
CalendarPeriod timeUnit,
CoordinateRuntime runtime,
CoordinateTimeAbstract otime,
List<Coordinate> times) |
CoordinateTime2D(int code,
CalendarPeriod timeUnit,
CoordinateRuntime runtime,
List<Coordinate> regList,
List<Coordinate> times) |
CoordinateTime2D(int code,
CalendarPeriod timeUnit,
List<CoordinateTime2D.Time2D> vals,
CoordinateRuntime runtime,
List<Coordinate> times)
Ctor
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
void |
getIndex(CoordinateTime2D.Time2D want,
int[] wholeIndex)
find the run and time indexes of want
the inverse of getOrgValue
|
int |
getIndex(Object val) |
int |
getNruns() |
int |
getNtimes() |
int |
getOffset(int runIndex) |
List<? extends Object> |
getOffsetsSorted()
Get a sorted list of the unique time coordinates
|
CoordinateTime2D.Time2D |
getOrgValue(int runIdx,
int timeIdx,
boolean debug)
Get the time coordinate at the given indices, into the 2D time coordinate array
|
CalendarDate |
getRefDate(int runIdx) |
CoordinateRuntime |
getRuntimeCoordinate() |
int |
getSize() |
CoordinateTimeAbstract |
getTimeCoordinate(int runIdx) |
String |
getTimeIntervalName()
Check if all time intervals have the same length.
|
List<? extends Coordinate> |
getTimesForSerialization()
public by accident - do not use
|
Coordinate.Type |
getType() |
Object |
getValue(int idx) |
List<? extends Object> |
getValues() |
int |
hashCode() |
boolean |
isOrthogonal() |
boolean |
isRegular() |
boolean |
isTimeInterval() |
CoordinateTimeAbstract |
makeBestTimeCoordinate(List<Double> runOffsets) |
CalendarDateRange |
makeCalendarDateRange(Calendar cal) |
int[] |
makeTime2RuntimeMap(CoordinateTimeAbstract coordBest,
TwoDTimeInventory timeInventory)
for each time Coordinate in CoordBest, which runtime coordinate does it use? 1-based so 0 = missing
|
int |
matchTimeCoordinate(int runIdx,
Object value,
CalendarDate refDateOfValue)
Find the index matching a runtime and time coordinate
|
void |
showCoords(Formatter info) |
void |
showInfo(Formatter info,
Indent indent) |
getCode, getName, getPeriod, getRefDate, getTimeUnit, getTimeUnitScale, getUnit, setName, setRefDateclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitgetCode, getName, getUnitpublic CoordinateTime2D(int code,
CalendarPeriod timeUnit,
List<CoordinateTime2D.Time2D> vals,
CoordinateRuntime runtime,
List<Coordinate> times)
code - pdsFirst.getTimeUnit()timeUnit - time duration, based on codevals - complete set of time coordinates, or null when reading from ncx2runtime - list of runtimestimes - list of times, one for each runtime, offsets reletive to its runtimepublic CoordinateTime2D(int code,
CalendarPeriod timeUnit,
CoordinateRuntime runtime,
CoordinateTimeAbstract otime,
List<Coordinate> times)
public CoordinateTime2D(int code,
CalendarPeriod timeUnit,
CoordinateRuntime runtime,
List<Coordinate> regList,
List<Coordinate> times)
public CoordinateRuntime getRuntimeCoordinate()
public boolean isTimeInterval()
public boolean isOrthogonal()
public boolean isRegular()
public int getNtimes()
public int getNruns()
public int getOffset(int runIndex)
public void showInfo(Formatter info, Indent indent)
showInfo in interface Coordinatepublic void showCoords(Formatter info)
showCoords in interface Coordinatepublic List<? extends Object> getValues()
getValues in interface Coordinatepublic Object getValue(int idx)
getValue in interface Coordinatepublic int getIndex(Object val)
getIndex in interface Coordinatepublic int getSize()
getSize in interface Coordinatepublic Coordinate.Type getType()
getType in interface Coordinatepublic String getTimeIntervalName()
public CalendarDateRange makeCalendarDateRange(Calendar cal)
makeCalendarDateRange in class CoordinateTimeAbstractpublic CoordinateTimeAbstract getTimeCoordinate(int runIdx)
public CalendarDate getRefDate(int runIdx)
public CoordinateTime2D.Time2D getOrgValue(int runIdx, int timeIdx, boolean debug)
runIdx - run indextimeIdx - time indexpublic void getIndex(CoordinateTime2D.Time2D want, int[] wholeIndex)
want - find time coordinate that matcheswholeIndex - return index herepublic int matchTimeCoordinate(int runIdx,
Object value,
CalendarDate refDateOfValue)
runIdx - which runvalue - time coordinaterefDateOfValue - reference time of time coordinatepublic CoordinateTimeAbstract makeBestTimeCoordinate(List<Double> runOffsets)
makeBestTimeCoordinate in class CoordinateTimeAbstractpublic int[] makeTime2RuntimeMap(CoordinateTimeAbstract coordBest, TwoDTimeInventory timeInventory)
coordBest - the set of coordinatestimeInventory - whether records exist for each run, timepublic List<? extends Coordinate> getTimesForSerialization()
Copyright © 1999–2014 UCAR/Unidata. All rights reserved.