Interface DataSource

All Known Implementing Classes:
Ticker

public interface DataSource

A DataSource provides a mechanism that allows PointValue producers and PointValue consumers to communicate.Implementors of this interface produce points on demand.

See Also:
PointValue

Method Summary
 int max()
          Determines the maximum expected value.
 PointValue next()
          Generates the next point in the series.
 

Method Detail

next

public PointValue next()
Generates the next point in the series.

Returns:
null if the series has terminated, else next point in the series.

max

public int max()
Determines the maximum expected value. DataSources should not return values larger than their advertised maximum. This can be used by clients who need to scale values.

Returns:
the maximum value expected from this source.