simtools.data.async
Class TimeStampedDataSource.TimeSource
java.lang.Object
simtools.data.ValueProvider
simtools.data.DataSource
simtools.data.async.TimeStampedDataSource.TimeSource
- Direct Known Subclasses:
- AsynchronousMergeDSCollection.AsynchronousMergeDataSource.RefTime, StreamingTSDataSource.StreamingTimeSource, TimeStampedEmptyDataSource.TimeSourceEmpty
- Enclosing class:
- TimeStampedDataSource
public abstract class TimeStampedDataSource.TimeSource
- extends DataSource
Methods inherited from class simtools.data.DataSource |
addEndNotificationListener, addListener, computeLastIndex, computeMax, computeMin, computeSortedOrder, computeStartIndex, createEmptyDataSource, equals, getAuxiliarySources, getByteMax, getByteMin, getChoiceFormat, getDataSourceInformationClass, getDoubleMax, getDoubleMin, getFloatMax, getFloatMin, getIntegerMax, getIntegerMin, getLongMax, getLongMin, getShortMax, getShortMin, getSortedOrder, getSourceDependencies, isComparable, isCompound, notifyEndNotificationListeners, notifyListenersForDataReplaced, notifyListenersForDataReplaced, notifyListenersForIndexRangeChange, notifyListenersForInfoChange, notifyListenersForOrderChange, notifyListenersForValueChange, notifyListenersForValueRangeChange, removeEndNotificationListener, removeListener, setSlice, updateSortedOrder |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
info
protected DataInfo info
TimeStampedDataSource.TimeSource
public TimeStampedDataSource.TimeSource(java.lang.String name)
TimeStampedDataSource.TimeSource
public TimeStampedDataSource.TimeSource()
getValue
public abstract java.lang.Object getValue(long index)
throws DataException
- Specified by:
getValue
in class ValueProvider
- Throws:
DataException
getDoubleValue
public abstract double getDoubleValue(long index)
throws DataException
- Description copied from class:
ValueProvider
- Optimized accessor for double values. If the provider can provide doubles directly,
then it should override this method. Otherwise, the default implementation will
do its best to convert the Object returned by getValue() to a double.
This conversion also parses strings, and returns 0 if it failed. An exception is thrown
if, and only if, getValue throws it.
- Overrides:
getDoubleValue
in class ValueProvider
- Throws:
DataException
getStartIndex
public long getStartIndex()
throws UnsupportedOperation
- Overrides:
getStartIndex
in class DataSource
- Throws:
UnsupportedOperation
getLastIndex
public long getLastIndex()
throws UnsupportedOperation
- Overrides:
getLastIndex
in class DataSource
- Throws:
UnsupportedOperation
getMin
public java.lang.Object getMin()
throws UnsupportedOperation
- Description copied from class:
DataSource
- Return values if possibly only, without expensive computations.
- Overrides:
getMin
in class DataSource
- Throws:
UnsupportedOperation
getMax
public java.lang.Object getMax()
throws UnsupportedOperation
- Overrides:
getMax
in class DataSource
- Throws:
UnsupportedOperation
sortedOrder
public int sortedOrder()
- Description copied from class:
DataSource
- Check if the values are sorted or not. This is usefull to optimize some
computations (curves drawing for instance)
- Overrides:
sortedOrder
in class DataSource
- Returns:
- 0 if the values are not sorted, 1 if the values are sorted in
ascending order and -1 if the values are sorted in descending
order
getInformation
public DataInfo getInformation()
- Overrides:
getInformation
in class DataSource
isAuxiliary
public boolean isAuxiliary()
- Overrides:
isAuxiliary
in class DataSource
- Returns:
- true if the data source is an auxiliary data source