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:
java.lang.Iterable<T>, IBackwardsIterable<T>
Direct Known Subclasses:
BoundedTimeSeries

public class TimeSeries<T extends ITimeSeriesPoint>
extends java.lang.Object
implements java.lang.Iterable<T>, IBackwardsIterable<T>
Since:
1.14
Author:
Sören Henning
  • Constructor Summary

    Constructors 
    Constructor Description
    TimeSeries()
    Constructs an empty time series.
    TimeSeries​(TimeSeries<T> timeSeries)
    Constructs a copy of the specified time series.
  • Method Summary

    Modifier and Type Method Description
    void appendBegin​(T timeSeriesPoint)
    Appends a point at the end of this time series, so the point is the new earliest point in this time series.
    void appendEnd​(T timeSeriesPoint)
    Appends a point at the end of this time series, so the point is the new latest point in this time series.
    java.util.Iterator<T> backwardsIterator()
    Returns an iterator over the time series points in this time series.
    ITimeSeriesPoint getBegin()
    Returns the first/earliest point of this time series, or if this time series is empty.
    ITimeSeriesPoint getEnd()
    Returns the last/latest point of this time series, or if this time series is empty.
    boolean isEmpty()
    Returns true if this time series contains no time series points.
    java.util.Iterator<T> iterator()
    Returns an iterator over the time series points in this time series.
    ITimeSeriesPoint removeBegin()
    Retrieves and removes the first/earliest point of this time series, or returns if this time series is empty.
    ITimeSeriesPoint removeEnd()
    Retrieves and removes the last/latest point of this time series, or returns if this time series is empty.
    int size()
    Returns the number of time series points in this time series.
    java.util.stream.Stream<T> stream()
    Returns a sequential Stream with this time series as its source.
    java.lang.String toString()  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface kieker.analysis.util.IBackwardsIterable

    backwards

    Methods inherited from interface java.lang.Iterable

    forEach, spliterator
  • Constructor Details

    • TimeSeries

      public TimeSeries()
      Constructs an empty time series.
    • TimeSeries

      public TimeSeries​(TimeSeries<T> timeSeries)
      Constructs a copy of the specified time series.
  • Method Details

    • appendBegin

      public void appendBegin​(T timeSeriesPoint)
      Appends a point at the end of this time series, so the point is the new earliest point in this time series.
    • appendEnd

      public void appendEnd​(T timeSeriesPoint)
      Appends a point at the end of this time series, so the point is the new latest point in this time series.
    • getBegin

      public ITimeSeriesPoint getBegin()
      Returns the first/earliest point of this time series, or if this time series is empty.
    • getEnd

      public ITimeSeriesPoint getEnd()
      Returns the last/latest point of this time series, or if this time series is empty.
    • removeBegin

      public ITimeSeriesPoint removeBegin()
      Retrieves and removes the first/earliest point of this time series, or returns if this time series is empty.
    • removeEnd

      public ITimeSeriesPoint removeEnd()
      Retrieves and removes the last/latest point of this time series, or returns if this time series is empty.
    • iterator

      public java.util.Iterator<T> 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:
      iterator in interface java.lang.Iterable<T extends ITimeSeriesPoint>
    • backwardsIterator

      public java.util.Iterator<T> 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:
      backwardsIterator in interface IBackwardsIterable<T extends ITimeSeriesPoint>
      Returns:
      returns the iterator
    • stream

      public java.util.stream.Stream<T> stream()
      Returns a sequential Stream with 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()
      Returns true if this time series contains no time series points.
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object