Class LinearDataFeed

  • All Implemented Interfaces:
    DataFeed

    public class LinearDataFeed
    extends Object
    implements DataFeed
    Data stream values from this feed follows linear function.
    • Constructor Detail

      • LinearDataFeed

        public LinearDataFeed​(double period)
    • Method Detail

      • getPeriod

        public double getPeriod()
      • setPeriod

        public void setPeriod​(double period)
      • getCurrentTime

        public double getCurrentTime()
      • setCurrentTime

        public void setCurrentTime​(double currentTime)
      • getNextValue

        public Data getNextValue​(Object... params)
        Description copied from interface: DataFeed
        Returns value from DataFeed. This method is used to compute new data. Flexibility with number of parameters aims to provide freedom in implementation of whole DataFeed.
        Specified by:
        getNextValue in interface DataFeed
        Parameters:
        params - for DataFeed computing
        Returns:
        computed value
      • getPreviousValue

        public Data getPreviousValue()
        Description copied from interface: DataFeed
        Returns last generated value from DataFeed. Important for easy comparison between new and previous values.
        Specified by:
        getPreviousValue in interface DataFeed
        Returns:
        last generated value
      • setLabel

        public void setLabel​(String label)
        Description copied from interface: DataFeed
        Sets label for DataFeed
        Specified by:
        setLabel in interface DataFeed
        Parameters:
        label - the label
      • getLabel

        public String getLabel()
        Description copied from interface: DataFeed
        Returns label for DataFeed
        Specified by:
        getLabel in interface DataFeed
        Returns:
        label