anl.aida.data
Class RegularTimeAxis
java.lang.Object
anl.aida.data.AbstractCoordAxis
anl.aida.data.RegularTimeAxis
- All Implemented Interfaces:
- CoordAxis, TimeCoordAxis
public class RegularTimeAxis
- extends AbstractCoordAxis
- implements TimeCoordAxis
TimeAxis with a regular interval
Method Summary |
AxisType |
getAxisType()
Gets the type of this axis. |
java.util.Date |
getDate(int timestep)
Returns the Date for the specified timestep, or null if the timestep is
invalid. |
int |
getTimeStep(java.util.Date date)
Gets the timestep that corresponds to the specified date. |
double |
getValue(int index)
Gets the value at the specified index. |
java.lang.String |
getValueAsString(int index)
Gets the value as String at the specified index. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
interval
private int interval
iUnit
private TimeIntervalUnit iUnit
startDate
private java.util.Date startDate
cal
private java.util.Calendar cal
RegularTimeAxis
public RegularTimeAxis(java.util.Date start,
int interval,
AxisData data)
getDate
public java.util.Date getDate(int timestep)
- Description copied from interface:
TimeCoordAxis
- Returns the Date for the specified timestep, or null if the timestep is
invalid.
- Specified by:
getDate
in interface TimeCoordAxis
- Parameters:
timestep
- the time step we want the date for.
- Returns:
- the Date for the specified timestep
getTimeStep
public int getTimeStep(java.util.Date date)
- Description copied from interface:
TimeCoordAxis
- Gets the timestep that corresponds to the specified date. If no such
timestep is found then return Axes.TIME_STEP_NOT_FOUND.
- Specified by:
getTimeStep
in interface TimeCoordAxis
- Parameters:
date
- the date whose time step we want
- Returns:
- the timestep that corresponds to the specified date. If no such
timestep is found then return Axes.TIME_STEP_NOT_FOUND.
getAxisType
public AxisType getAxisType()
- Description copied from interface:
CoordAxis
- Gets the type of this axis.
- Specified by:
getAxisType
in interface CoordAxis
- Overrides:
getAxisType
in class AbstractCoordAxis
- Returns:
- the type of this axis.
getValue
public double getValue(int index)
- Description copied from interface:
CoordAxis
- Gets the value at the specified index.
- Specified by:
getValue
in interface CoordAxis
- Parameters:
index
- the index
- Returns:
- the value at the specified index.
getValueAsString
public java.lang.String getValueAsString(int index)
- Gets the value as String at the specified index.
- Specified by:
getValueAsString
in interface CoordAxis
- Parameters:
index
- the index of the value to get
- Returns:
- the value as String at the specified index.