Kieker 1.9

kieker.tools.tslib
Class TimeSeries<T>

java.lang.Object
  extended by kieker.tools.tslib.TimeSeries<T>
Type Parameters:
T -
All Implemented Interfaces:
ITimeSeries<T>

public class TimeSeries<T>
extends Object
implements ITimeSeries<T>

Since:
1.9
Author:
Andre van Hoorn

Field Summary
 
Fields inherited from interface kieker.tools.tslib.ITimeSeries
INFINITE_CAPACITY
 
Constructor Summary
TimeSeries(long startTime, long deltaTime, TimeUnit deltaTimeUnit)
           
TimeSeries(long startTime, long deltaTime, TimeUnit deltaTimeUnit, int capacity)
           
 
Method Summary
 ITimeSeriesPoint<T> append(T value)
          Appends the given value to the time series.
 List<ITimeSeriesPoint<T>> appendAll(T[] values)
          Appends the given value to the time series.
 int getCapacity()
          Returns the maximum number of elements held in this time series.
 long getDeltaTime()
          Returns the temporal distance between to time series values with respect to the configured TimeUnit ITimeSeries.getDeltaTime().
 TimeUnit getDeltaTimeUnit()
          The TimeUnit used to specify the temporal distance between to values (ITimeSeries.getDeltaTime()).
 long getEndTime()
          Returns the time corresponding to the most recent value in the time series
 List<ITimeSeriesPoint<T>> getPoints()
          Returns the ITimeSeriesPoints of this time series.
 long getStartTime()
          Returns the start of the time series, i.e., the time of the first value.
 List<T> getValues()
          Returns a list of all getPoints()getValues()
 int size()
          Returns the number of value contained in the time series
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TimeSeries

public TimeSeries(long startTime,
                  long deltaTime,
                  TimeUnit deltaTimeUnit,
                  int capacity)
Parameters:
startTime -
deltaTime -
deltaTimeUnit -
capacity -

TimeSeries

public TimeSeries(long startTime,
                  long deltaTime,
                  TimeUnit deltaTimeUnit)
Method Detail

getStartTime

public long getStartTime()
Description copied from interface: ITimeSeries
Returns the start of the time series, i.e., the time of the first value.

Specified by:
getStartTime in interface ITimeSeries<T>

getDeltaTime

public long getDeltaTime()
Description copied from interface: ITimeSeries
Returns the temporal distance between to time series values with respect to the configured TimeUnit ITimeSeries.getDeltaTime().

Specified by:
getDeltaTime in interface ITimeSeries<T>

getDeltaTimeUnit

public TimeUnit getDeltaTimeUnit()
Description copied from interface: ITimeSeries
The TimeUnit used to specify the temporal distance between to values (ITimeSeries.getDeltaTime()).

Specified by:
getDeltaTimeUnit in interface ITimeSeries<T>

append

public ITimeSeriesPoint<T> append(T value)
Description copied from interface: ITimeSeries
Appends the given value to the time series.

Specified by:
append in interface ITimeSeries<T>
Parameters:
value - the value to append

getPoints

public List<ITimeSeriesPoint<T>> getPoints()
Description copied from interface: ITimeSeries
Returns the ITimeSeriesPoints of this time series.

Specified by:
getPoints in interface ITimeSeries<T>

getValues

public List<T> getValues()
Description copied from interface: ITimeSeries
Returns a list of all getPoints()getValues()

Specified by:
getValues in interface ITimeSeries<T>

getCapacity

public int getCapacity()
Description copied from interface: ITimeSeries
Returns the maximum number of elements held in this time series.

Specified by:
getCapacity in interface ITimeSeries<T>
Returns:
the capacity; ITimeSeries.INFINITE_CAPACITY if the capacity is infinite

size

public int size()
Description copied from interface: ITimeSeries
Returns the number of value contained in the time series

Specified by:
size in interface ITimeSeries<T>

getEndTime

public long getEndTime()
Description copied from interface: ITimeSeries
Returns the time corresponding to the most recent value in the time series

Specified by:
getEndTime in interface ITimeSeries<T>

appendAll

public List<ITimeSeriesPoint<T>> appendAll(T[] values)
Description copied from interface: ITimeSeries
Appends the given value to the time series.

Specified by:
appendAll in interface ITimeSeries<T>

toString

public String toString()
Overrides:
toString in class Object

Kieker 1.9

Copyright 2014 Kieker Project, http://kieker-monitoring.net