simtools.data.async
Class AsynchronousMergeDSCollection.AsynchronousMergeDataSource

java.lang.Object
  extended by simtools.data.ValueProvider
      extended by simtools.data.DataSource
          extended by simtools.data.async.TimeStampedDataSource
              extended by simtools.data.async.AsynchronousMergeDSCollection.AsynchronousMergeDataSource
Enclosing class:
AsynchronousMergeDSCollection

public class AsynchronousMergeDSCollection.AsynchronousMergeDataSource
extends TimeStampedDataSource


Nested Class Summary
 class AsynchronousMergeDSCollection.AsynchronousMergeDataSource.RefTime
           
 
Nested classes/interfaces inherited from class simtools.data.async.TimeStampedDataSource
TimeStampedDataSource.TimeSource
 
Field Summary
protected  TimeStampedDataSource.TimeSource ref
           
protected  DataSource source
           
 
Fields inherited from class simtools.data.async.TimeStampedDataSource
_auxiliaries
 
Fields inherited from class simtools.data.DataSource
endNotificationListeners, listeners, sortedOrder
 
Fields inherited from class simtools.data.ValueProvider
ByteProvider, DoubleProvider, FloatProvider, IntegerProvider, kind, LongProvider, ObjectProvider, ShortProvider
 
Constructor Summary
AsynchronousMergeDSCollection.AsynchronousMergeDataSource(java.lang.String label, java.lang.String id, DataSource source, DataSource timeSource, boolean isRelative, double offset, double initialDate)
           
AsynchronousMergeDSCollection.AsynchronousMergeDataSource(java.lang.String label, java.lang.String id, DataSource source, TimeStampedDataSource.TimeSource ref)
           
 
Method Summary
protected  void computeMinMax()
           
 double getDoubleMax()
           
 double getDoubleMin()
           
 double getDoubleValue(long index)
          Optimized accessor for double values.
 double getEnd()
           
 long getLastIndex()
           
 java.lang.Object getMax()
           
 java.lang.Object getMin()
          Return values if possibly only, without expensive computations.
 double getStart()
           
 long getStartIndex()
           
 java.lang.Object getValue(long index)
           
 boolean isValid()
           
protected  void setInfo(java.lang.String name)
           
 
Methods inherited from class simtools.data.async.TimeStampedDataSource
createEmptyDataSource, getAuxiliarySources, getCollection, getDataSourceInformationClass, getInfo, getInformation, getName, getTime, isCompound, setInfo, setMax, setMin, setMinmax, setTime, toString
 
Methods inherited from class simtools.data.DataSource
addEndNotificationListener, addListener, computeLastIndex, computeMax, computeMin, computeSortedOrder, computeStartIndex, 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 simtools.data.ValueProvider
getByteValue, getFloatValue, getIntegerValue, getKind, getLongValue, getObjectValue, getShortValue, valueClass
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

source

protected final DataSource source

ref

protected final TimeStampedDataSource.TimeSource ref
Constructor Detail

AsynchronousMergeDSCollection.AsynchronousMergeDataSource

public AsynchronousMergeDSCollection.AsynchronousMergeDataSource(java.lang.String label,
                                                                 java.lang.String id,
                                                                 DataSource source,
                                                                 DataSource timeSource,
                                                                 boolean isRelative,
                                                                 double offset,
                                                                 double initialDate)
                                                          throws DataException,
                                                                 java.io.IOException,
                                                                 TimeStampedDataSourceCollection.InvalidFormatException
Throws:
DataException
java.io.IOException
TimeStampedDataSourceCollection.InvalidFormatException

AsynchronousMergeDSCollection.AsynchronousMergeDataSource

public AsynchronousMergeDSCollection.AsynchronousMergeDataSource(java.lang.String label,
                                                                 java.lang.String id,
                                                                 DataSource source,
                                                                 TimeStampedDataSource.TimeSource ref)
                                                          throws java.io.IOException,
                                                                 TimeStampedDataSourceCollection.InvalidFormatException
Throws:
java.io.IOException
TimeStampedDataSourceCollection.InvalidFormatException
Method Detail

setInfo

protected void setInfo(java.lang.String name)

getStart

public double getStart()
Specified by:
getStart in class TimeStampedDataSource

getEnd

public double getEnd()
Specified by:
getEnd in class TimeStampedDataSource

computeMinMax

protected void computeMinMax()
                      throws UnsupportedOperation
Specified by:
computeMinMax in class TimeStampedDataSource
Throws:
UnsupportedOperation

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

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

isValid

public boolean isValid()
Specified by:
isValid in class TimeStampedDataSource
Returns:
true if it is valid

getDoubleMin

public double getDoubleMin()
                    throws DataException
Overrides:
getDoubleMin in class TimeStampedDataSource
Throws:
DataException

getDoubleMax

public double getDoubleMax()
                    throws DataException
Overrides:
getDoubleMax in class TimeStampedDataSource
Throws:
DataException

getMax

public java.lang.Object getMax()
Overrides:
getMax in class TimeStampedDataSource
Returns:
Returns the max.

getMin

public java.lang.Object getMin()
Description copied from class: DataSource
Return values if possibly only, without expensive computations.

Overrides:
getMin in class TimeStampedDataSource
Returns:
Returns the min.