anl.aida.data
Class DataFrameTimeAxis
java.lang.Object
anl.aida.data.AxisRange
anl.aida.data.DataFrameAxis
anl.aida.data.DataFrameTimeAxis
- All Implemented Interfaces:
- CoordAxis, TimeCoordAxis
public class DataFrameTimeAxis
- extends DataFrameAxis
- implements TimeCoordAxis
Time axis for a DataFrame.
- Version:
- $Revision$ $Date$
Method Summary |
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. |
Methods inherited from class anl.aida.data.AxisRange |
getAttribute, getAxis, getAxisType, getDescription, getExtent, getName, getOrigin, getRange, getUnits, getValue, getValueAsString, isCompatible |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DataFrameTimeAxis
public DataFrameTimeAxis(TimeCoordAxis axis,
int index)
- Creates a DataFrameAxis for the specified axis with origin and extent equal
to that of the axis.
- Parameters:
axis
- the axisindex
- the array index of this axis
DataFrameTimeAxis
public DataFrameTimeAxis(TimeCoordAxis axis,
int origin,
int extent,
int index)
- Creates a DataFrameAxis for the specified axis with the specified origin
and extent.
- Parameters:
origin
- the origin of the rangeextent
- the extent of the rangeaxis
- the axisindex
- the array index of this axis
DataFrameTimeAxis
public DataFrameTimeAxis(DataFrameTimeAxis axis,
int index)
- Creates a DataFrameAxis from the specified axis and index. This
DataFrameAxis will have the same origin and extent as the specified axis.
- Parameters:
axis
- the axis to create this DataFrameAxis fromindex
- the array index of this axis
getDate
public java.util.Date getDate(int timestep)
- 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)
- 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.