Package kieker.analysis.util.timeseries
Class TimeSeries<T extends ITimeSeriesPoint>
java.lang.Object
kieker.analysis.util.timeseries.TimeSeries<T>
- Type Parameters:
T- Type of the elements in this time series.
- All Implemented Interfaces:
Iterable<T>,IBackwardsIterable<T>
- Direct Known Subclasses:
BoundedTimeSeries
public class TimeSeries<T extends ITimeSeriesPoint>
extends Object
implements Iterable<T>, IBackwardsIterable<T>
- Since:
- 1.14
- Author:
- Sören Henning
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs an empty time series.TimeSeries(TimeSeries<T> timeSeries) Constructs a copy of the specified time series. -
Method Summary
Modifier and TypeMethodDescriptionvoidappendBegin(T timeSeriesPoint) Appends a point at the end of this time series, so the point is the new earliest point in this time series.voidAppends a point at the end of this time series, so the point is the new latest point in this time series.Returns an iterator over the time series points in this time series.getBegin()Returns the first/earliest point of this time series, or if this time series is empty.getEnd()Returns the last/latest point of this time series, or if this time series is empty.booleanisEmpty()Returnstrueif this time series contains no time series points.iterator()Returns an iterator over the time series points in this time series.Retrieves and removes the first/earliest point of this time series, or returns if this time series is empty.Retrieves and removes the last/latest point of this time series, or returns if this time series is empty.intsize()Returns the number of time series points in this time series.stream()Returns a sequentialStreamwith this time series as its source.toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface kieker.analysis.util.IBackwardsIterable
backwardsMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
TimeSeries
public TimeSeries()Constructs an empty time series. -
TimeSeries
Constructs a copy of the specified time series.
-
-
Method Details
-
appendBegin
Appends a point at the end of this time series, so the point is the new earliest point in this time series. -
appendEnd
Appends a point at the end of this time series, so the point is the new latest point in this time series. -
getBegin
Returns the first/earliest point of this time series, or if this time series is empty. -
getEnd
Returns the last/latest point of this time series, or if this time series is empty. -
removeBegin
Retrieves and removes the first/earliest point of this time series, or returns if this time series is empty. -
removeEnd
Retrieves and removes the last/latest point of this time series, or returns if this time series is empty. -
iterator
Returns an iterator over the time series points in this time series. The points will be returned in temporal order from earliest to latest.- Specified by:
iteratorin interfaceIterable<T extends ITimeSeriesPoint>
-
backwardsIterator
Returns an iterator over the time series points in this time series. The points will be returned in temporal order from latest to earliest.- Specified by:
backwardsIteratorin interfaceIBackwardsIterable<T extends ITimeSeriesPoint>- Returns:
- returns the iterator
-
stream
Returns a sequentialStreamwith this time series as its source. -
size
public int size()Returns the number of time series points in this time series. -
isEmpty
public boolean isEmpty()Returnstrueif this time series contains no time series points. -
toString
-