simtools.data.async
Class MultiStampedDataSource.IntegerSource
java.lang.Object
simtools.data.ValueProvider
simtools.data.DataSource
simtools.data.async.TimeStampedDataSource
simtools.data.async.MultiStampedDataSource.IntegerSource
- Enclosing class:
- MultiStampedDataSource
public abstract class MultiStampedDataSource.IntegerSource
- extends TimeStampedDataSource
Field Summary |
protected java.lang.String |
type
|
Methods inherited from class simtools.data.async.TimeStampedDataSource |
createEmptyDataSource, getCollection, getDataSourceInformationClass, getDoubleMax, getDoubleMin, getInfo, getInformation, getMax, getMin, getName, getTime, setInfo, setMax, setMin, setMinmax, setTime, toString |
Methods inherited from class simtools.data.DataSource |
addEndNotificationListener, addListener, computeLastIndex, computeMax, computeMin, computeSortedOrder, computeStartIndex, equals, getByteMax, getByteMin, getFloatMax, getFloatMin, getIntegerMax, getIntegerMin, getLongMax, getLongMin, getShortMax, getShortMin, getSortedOrder, getSourceDependencies, 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 |
type
protected java.lang.String type
MultiStampedDataSource.IntegerSource
public MultiStampedDataSource.IntegerSource(java.lang.String type)
throws java.io.IOException,
TimeStampedDataSourceCollection.InvalidFormatException
- Throws:
java.io.IOException
TimeStampedDataSourceCollection.InvalidFormatException
getValue
public abstract java.lang.Object getValue(long index)
throws DataException
- Specified by:
getValue
in class TimeStampedDataSource
- 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.
- Specified by:
getDoubleValue
in class TimeStampedDataSource
- Throws:
DataException
getLongValue
public abstract long getLongValue(long index)
throws DataException
- Description copied from class:
ValueProvider
- Optimized accessor for long values. If the provider can provide longs directly,
then it should override this method. Otherwise, the default implementation will
do its best to convert the Object returned by getValue() to a long.
This conversion also parses strings, and returns 0 if it failed. An exception is thrown
if, and only if, getValue throws it.
- Overrides:
getLongValue
in class ValueProvider
- Throws:
DataException
getStartIndex
public long getStartIndex()
throws UnsupportedOperation
- Specified by:
getStartIndex
in class TimeStampedDataSource
- Throws:
UnsupportedOperation
getLastIndex
public long getLastIndex()
throws UnsupportedOperation
- Specified by:
getLastIndex
in class TimeStampedDataSource
- Throws:
UnsupportedOperation
getStart
public double getStart()
throws DataException
- Specified by:
getStart
in class TimeStampedDataSource
- Throws:
DataException
getEnd
public double getEnd()
throws DataException
- Specified by:
getEnd
in class TimeStampedDataSource
- Throws:
DataException
computeMinMax
protected void computeMinMax()
throws UnsupportedOperation
- Specified by:
computeMinMax
in class TimeStampedDataSource
- Throws:
UnsupportedOperation
getAuxiliarySources
public java.util.Collection getAuxiliarySources()
- Description copied from class:
DataSource
- If the data source is compund return the collection of auxiliary data
sources
- Overrides:
getAuxiliarySources
in class TimeStampedDataSource
- Returns:
- the auxilary data source collection or null if not a compound
data source
getChoiceFormat
public java.text.ChoiceFormat getChoiceFormat()
- Description copied from class:
DataSource
- This method allows you to attach a format to data source values
- Overrides:
getChoiceFormat
in class DataSource
- Returns:
- datasource choiceformat
isCompound
public boolean isCompound()
- Description copied from class:
DataSource
- Checks if a data source is compound, i.e. if it provides auxiliary data
sources
- Overrides:
isCompound
in class TimeStampedDataSource
- Returns:
- true if it is compound
isValid
public boolean isValid()
- Specified by:
isValid
in class TimeStampedDataSource
- Returns:
- true if it is valid
isAuxiliary
public boolean isAuxiliary()
- Overrides:
isAuxiliary
in class DataSource
- Returns:
- true if the data source is an auxiliary data source