simtools.data.async
Class TimeStampedEmptyDataSource
java.lang.Object
simtools.data.ValueProvider
simtools.data.DataSource
simtools.data.async.TimeStampedDataSource
simtools.data.async.TimeStampedEmptyDataSource
- All Implemented Interfaces:
- EmptyDataSource
public class TimeStampedEmptyDataSource
- extends TimeStampedDataSource
- implements EmptyDataSource
This dataSource can be used for temporary data source, which contains no
information but have to be created.
- Author:
- zxpletran007
Constructor Summary |
TimeStampedEmptyDataSource(java.lang.String dsId,
java.lang.String dscId,
java.lang.Object dsOptionalInformation)
|
Methods inherited from class simtools.data.async.TimeStampedDataSource |
createEmptyDataSource, getAuxiliarySources, getCollection, getDataSourceInformationClass, getDoubleMax, getDoubleMin, getInfo, getInformation, getMax, getMin, getName, getTime, isCompound, setInfo, setMax, setMin, setMinmax, setTime, toString |
Methods inherited from class simtools.data.DataSource |
addEndNotificationListener, addListener, computeSortedOrder, equals, getByteMax, getByteMin, getChoiceFormat, getFloatMax, getFloatMin, getIntegerMax, getIntegerMin, getLongMax, getLongMin, getShortMax, getShortMin, getSortedOrder, getSourceDependencies, isAuxiliary, isComparable, notifyEndNotificationListeners, notifyListenersForDataReplaced, notifyListenersForDataReplaced, notifyListenersForIndexRangeChange, notifyListenersForInfoChange, notifyListenersForOrderChange, notifyListenersForValueChange, notifyListenersForValueRangeChange, removeEndNotificationListener, removeListener, setSlice, sortedOrder, updateSortedOrder |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
TimeStampedEmptyDataSource
public TimeStampedEmptyDataSource(java.lang.String dsId,
java.lang.String dscId,
java.lang.Object dsOptionalInformation)
throws java.io.IOException,
TimeStampedDataSourceCollection.InvalidFormatException
- Throws:
java.io.IOException
TimeStampedDataSourceCollection.InvalidFormatException
getDataSourceId
public java.lang.String getDataSourceId()
- Specified by:
getDataSourceId
in interface EmptyDataSource
- Returns:
- data source id related to missing data source
getDataSourceCollectionId
public java.lang.String getDataSourceCollectionId()
- Specified by:
getDataSourceCollectionId
in interface EmptyDataSource
- Returns:
- data source collection id related to missing data source
getDataSourceOptionalInformation
public java.lang.Object getDataSourceOptionalInformation()
- Specified by:
getDataSourceOptionalInformation
in interface EmptyDataSource
- Returns:
- data source optional information related to missing data source
getValue
public java.lang.Object getValue(long index)
throws DataException
- Specified by:
getValue
in class TimeStampedDataSource
- Throws:
DataException
getDoubleValue
public 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.
- Specified by:
getDoubleValue
in class TimeStampedDataSource
- Throws:
DataException
isValid
public boolean isValid()
- Specified by:
isValid
in class TimeStampedDataSource
- Returns:
- true if it is valid
getEnd
public double getEnd()
- Specified by:
getEnd
in class TimeStampedDataSource
getStart
public double getStart()
- Specified by:
getStart
in class TimeStampedDataSource
getLastIndex
public long getLastIndex()
throws UnsupportedOperation
- Specified by:
getLastIndex
in class TimeStampedDataSource
- Throws:
UnsupportedOperation
getStartIndex
public long getStartIndex()
throws UnsupportedOperation
- Specified by:
getStartIndex
in class TimeStampedDataSource
- Throws:
UnsupportedOperation
computeMinMax
protected void computeMinMax()
throws UnsupportedOperation
- Specified by:
computeMinMax
in class TimeStampedDataSource
- Throws:
UnsupportedOperation
computeMin
public java.lang.Object computeMin()
throws UnsupportedOperation
- Description copied from class:
DataSource
- Force the computation if possible. The operation may take some time.
- Overrides:
computeMin
in class DataSource
- Throws:
UnsupportedOperation
computeMax
public java.lang.Object computeMax()
throws UnsupportedOperation
- Overrides:
computeMax
in class DataSource
- Throws:
UnsupportedOperation
computeStartIndex
public long computeStartIndex()
throws UnsupportedOperation
- Overrides:
computeStartIndex
in class DataSource
- Throws:
UnsupportedOperation
computeLastIndex
public long computeLastIndex()
throws UnsupportedOperation
- Overrides:
computeLastIndex
in class DataSource
- Throws:
UnsupportedOperation