net.sf.statcvs.reportmodel
public class TimeLine extends Object
addChange(java.util.Date, int)
. If all points are
specified using addChange, an initial value must be given
using setInitialValue(int)
.Constructor and Description |
---|
TimeLine(String title,
String rangeLabel)
Creates a new time line.
|
Modifier and Type | Method and Description |
---|---|
void |
addChange(Date date,
int delta)
Specifies that the time line's value changed at a given date.
|
void |
addTimePoint(Date date,
int value)
Adds a data point to the time line.
|
List |
getDataPoints()
Returns a List of data points, ordered by date.
|
String |
getRangeLabel()
Returns the range label (axis label) of the values
|
String |
getTitle()
Returns the title of the time line
|
boolean |
isEmpty()
Checks if the time series is empty.
|
void |
setInitialValue(int initialValue)
Sets the initial value of the time line, that is the value just before
the first data point.
|
public void setInitialValue(int initialValue)
initialValue
- the time line's initial valuepublic void addTimePoint(Date date, int value)
date
- the data point's datevalue
- the data point's valuepublic void addChange(Date date, int delta)
date
- the data point's datedelta
- the value change at this timepublic boolean isEmpty()
public List getDataPoints()
TimePoint
spublic String getRangeLabel()
public String getTitle()