| java.lang.Object org.jfree.data.time.TimeSeriesDataItem
TimeSeriesDataItem | public class TimeSeriesDataItem implements Cloneable,Comparable,Serializable(Code) | | Represents one data item in a time series.
The time period can be any of the following:
The time period is an immutable property of the data item. Data items will
often be sorted within a list, and allowing the time period to be changed
could destroy the sort order.
Implements the Comparable interface so that standard Java
sorting can be used to keep the data items in order.
|
Method Summary | |
public Object | clone() Clones the data item. | public int | compareTo(Object o1) Returns an integer indicating the order of this data pair object
relative to another object.
For the order we consider only the timing:
negative == before, zero == same, positive == after.
Parameters: o1 - The object being compared to. | public boolean | equals(Object o) Tests this object for equality with an arbitrary object.
Parameters: o - the other object. | public RegularTimePeriod | getPeriod() Returns the time period. | public Number | getValue() Returns the value. | public int | hashCode() Returns a hash code. | public void | setValue(Number value) Sets the value for this data item. |
TimeSeriesDataItem | public TimeSeriesDataItem(RegularTimePeriod period, Number value)(Code) | | Constructs a new data item that associates a value with a time period.
Parameters: period - the time period (null not permitted). Parameters: value - the value (null permitted). |
TimeSeriesDataItem | public TimeSeriesDataItem(RegularTimePeriod period, double value)(Code) | | Constructs a new data item that associates a value with a time period.
Parameters: period - the time period (null not permitted). Parameters: value - the value associated with the time period. |
clone | public Object clone()(Code) | | Clones the data item. Note: there is no need to clone the period or
value since they are immutable classes.
A clone of the data item. |
compareTo | public int compareTo(Object o1)(Code) | | Returns an integer indicating the order of this data pair object
relative to another object.
For the order we consider only the timing:
negative == before, zero == same, positive == after.
Parameters: o1 - The object being compared to. An integer indicating the order of the data item object relative to another object. |
equals | public boolean equals(Object o)(Code) | | Tests this object for equality with an arbitrary object.
Parameters: o - the other object. A boolean. |
getValue | public Number getValue()(Code) | | Returns the value.
The value (null possible). |
hashCode | public int hashCode()(Code) | | Returns a hash code.
A hash code. |
setValue | public void setValue(Number value)(Code) | | Sets the value for this data item.
Parameters: value - the value (null permitted). |
|
|