Package ucar.nc2.iosp.grid
Class GridTimeCoord
- java.lang.Object
-
- ucar.nc2.iosp.grid.GridTimeCoord
-
- All Implemented Interfaces:
Comparable<GridTimeCoord>
public class GridTimeCoord extends Object implements Comparable<GridTimeCoord>
A Time Coordinate for a Grid dataset.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classGridTimeCoord.TimeCoordWithInterval
-
Field Summary
Fields Modifier and Type Field Description protected DatebaseDateprotected intconstantIntervalprotected int[]coordDataprotected booleanrefDateDiffersprotected intseqprotected List<GridTimeCoord.TimeCoordWithInterval>timeIntvsprotected List<Date>timesprotected StringtimeUdunitprotected inttimeUnit
-
Constructor Summary
Constructors Modifier Constructor Description protectedGridTimeCoord(List<GridRecord> records, String where)Create a new GridTimeCoord from the list of GridRecord
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(GridTimeCoord o)intfindIndex(GridRecord record)Find the index of a GridRecord in the list of timesStringgetCoord(int i)StringgetName()Get the namebooleanisInterval()is this a mixed interval ? Only true for Gribprotected booleanmatchTimes(List<GridRecord> records)match time values - can this list of GridRecords use this coordinate?
-
-
-
Field Detail
-
seq
protected int seq
-
timeUdunit
protected String timeUdunit
-
timeUnit
protected int timeUnit
-
baseDate
protected Date baseDate
-
refDateDiffers
protected boolean refDateDiffers
-
timeIntvs
protected List<GridTimeCoord.TimeCoordWithInterval> timeIntvs
-
constantInterval
protected int constantInterval
-
coordData
protected int[] coordData
-
-
Constructor Detail
-
GridTimeCoord
protected GridTimeCoord(List<GridRecord> records, String where)
Create a new GridTimeCoord from the list of GridRecord- Parameters:
records- records to usewhere- file location for warn message
-
-
Method Detail
-
matchTimes
protected boolean matchTimes(List<GridRecord> records)
match time values - can this list of GridRecords use this coordinate?- Parameters:
records- list of records- Returns:
- true if they are the same as this
-
getName
public String getName()
Get the name- Returns:
- the name
-
findIndex
public int findIndex(GridRecord record)
Find the index of a GridRecord in the list of times- Parameters:
record- the GridRecord- Returns:
- the index in the list of time values, or -1 if not found
-
isInterval
public boolean isInterval()
is this a mixed interval ? Only true for Grib- Returns:
- mixed
-
getCoord
public String getCoord(int i)
-
compareTo
public int compareTo(GridTimeCoord o)
- Specified by:
compareToin interfaceComparable<GridTimeCoord>
-
-