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 class
GridTimeCoord.TimeCoordWithInterval
-
Field Summary
Fields Modifier and Type Field Description protected Date
baseDate
protected int
constantInterval
protected int[]
coordData
protected boolean
refDateDiffers
protected int
seq
protected List<GridTimeCoord.TimeCoordWithInterval>
timeIntvs
protected List<Date>
times
protected String
timeUdunit
protected int
timeUnit
-
Constructor Summary
Constructors Modifier Constructor Description protected
GridTimeCoord(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 int
compareTo(GridTimeCoord o)
int
findIndex(GridRecord record)
Find the index of a GridRecord in the list of timesString
getCoord(int i)
String
getName()
Get the nameboolean
isInterval()
is this a mixed interval ? Only true for Gribprotected boolean
matchTimes(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:
compareTo
in interfaceComparable<GridTimeCoord>
-
-