|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectsimtools.data.ValueProvider
simtools.data.DataSource
simtools.data.CollectiveDataSource
public class CollectiveDataSource
A collective data source is a data source part of a collection The default implementation is to delegate the data source methods to the collection.
| Field Summary | |
|---|---|
protected DataSourceCollection |
collection
|
protected int |
myIndex
|
| 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 | |
|---|---|
CollectiveDataSource(DataSourceCollection c,
int i)
|
|
| Method Summary | |
|---|---|
void |
addEndNotificationListener(EndNotificationListener enl)
|
long |
computeLastIndex()
|
java.lang.Object |
computeMax()
|
java.lang.Object |
computeMin()
Force the computation if possible. |
long |
computeStartIndex()
|
protected DataSource |
createEmptyDataSource()
Create an empty data source with same references than current data source. |
byte |
getByteMax()
|
byte |
getByteMin()
|
byte |
getByteValue(long index)
Optimized accessor for byte values. |
DataSourceCollection |
getCollection()
|
double |
getDoubleMax()
|
double |
getDoubleMin()
|
double |
getDoubleValue(long index)
Optimized accessor for double values. |
float |
getFloatMax()
|
float |
getFloatMin()
|
float |
getFloatValue(long index)
Optimized accessor for float values. |
DataInfo |
getInformation()
These methods are common to the whole collection |
int |
getIntegerMax()
|
int |
getIntegerMin()
|
int |
getIntegerValue(long index)
Optimized accessor for int values. |
int |
getKind()
The kind of this provider may be used fo optimization purpose. |
long |
getLastIndex()
|
long |
getLongMax()
|
long |
getLongMin()
|
long |
getLongValue(long index)
Optimized accessor for long values. |
java.lang.Object |
getMax()
|
java.lang.Object |
getMin()
Return values if possibly only, without expensive computations. |
int |
getPosition()
|
short |
getShortMax()
|
short |
getShortMin()
|
short |
getShortValue(long index)
Optimized accessor for short values. |
long |
getStartIndex()
|
java.lang.Object |
getValue(long index)
|
boolean |
isComparable()
Check if the values are comparable with each other. |
void |
notifyEndNotificationListeners()
Warning: for collective data sources, you really should think twice before calling this function, as this will notify listeners for all sources in the collection. |
void |
removeEndNotificationListener(EndNotificationListener enl)
|
void |
setSlice(long min,
long max)
Sets a region of interest in the DataSource. |
int |
sortedOrder()
Check if the values are sorted or not. |
| Methods inherited from class simtools.data.ValueProvider |
|---|
getObjectValue, valueClass |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected DataSourceCollection collection
protected int myIndex
| Constructor Detail |
|---|
public CollectiveDataSource(DataSourceCollection c,
int i)
| Method Detail |
|---|
public DataSourceCollection getCollection()
public int getPosition()
public DataInfo getInformation()
getInformation in class DataSource
public long getStartIndex()
throws UnsupportedOperation
getStartIndex in class DataSourceUnsupportedOperation
public long getLastIndex()
throws UnsupportedOperation
getLastIndex in class DataSourceUnsupportedOperation
public void setSlice(long min,
long max)
DataSource
setSlice in class DataSource
public java.lang.Object getMin()
throws UnsupportedOperation
DataSource
getMin in class DataSourceUnsupportedOperation
public java.lang.Object getMax()
throws UnsupportedOperation
getMax in class DataSourceUnsupportedOperation
public java.lang.Object getValue(long index)
throws DataException
getValue in class ValueProviderDataException
public byte getByteValue(long index)
throws DataException
ValueProvider
getByteValue in class ValueProviderDataException
public byte getByteMin()
throws DataException
getByteMin in class DataSourceDataException
public byte getByteMax()
throws DataException
getByteMax in class DataSourceDataException
public short getShortValue(long index)
throws DataException
ValueProvider
getShortValue in class ValueProviderDataException
public short getShortMin()
throws DataException
getShortMin in class DataSourceDataException
public short getShortMax()
throws DataException
getShortMax in class DataSourceDataException
public int getIntegerValue(long index)
throws DataException
ValueProvider
getIntegerValue in class ValueProviderDataException
public int getIntegerMin()
throws DataException
getIntegerMin in class DataSourceDataException
public int getIntegerMax()
throws DataException
getIntegerMax in class DataSourceDataException
public long getLongValue(long index)
throws DataException
ValueProvider
getLongValue in class ValueProviderDataException
public long getLongMin()
throws DataException
getLongMin in class DataSourceDataException
public long getLongMax()
throws DataException
getLongMax in class DataSourceDataException
public float getFloatValue(long index)
throws DataException
ValueProvider
getFloatValue in class ValueProviderDataException
public float getFloatMin()
throws DataException
getFloatMin in class DataSourceDataException
public float getFloatMax()
throws DataException
getFloatMax in class DataSourceDataException
public double getDoubleValue(long index)
throws DataException
ValueProvider
getDoubleValue in class ValueProviderDataException
public double getDoubleMin()
throws DataException
getDoubleMin in class DataSourceDataException
public double getDoubleMax()
throws DataException
getDoubleMax in class DataSourceDataException
public java.lang.Object computeMin()
throws UnsupportedOperation
computeMin in class DataSourceUnsupportedOperation
public java.lang.Object computeMax()
throws UnsupportedOperation
computeMax in class DataSourceUnsupportedOperation
public long computeStartIndex()
throws UnsupportedOperation
computeStartIndex in class DataSourceUnsupportedOperation
public long computeLastIndex()
throws UnsupportedOperation
computeLastIndex in class DataSourceUnsupportedOperationpublic int getKind()
ValueProvider
getKind in class ValueProviderpublic int sortedOrder()
DataSource
sortedOrder in class DataSourcepublic boolean isComparable()
DataSource
isComparable in class DataSourcepublic void addEndNotificationListener(EndNotificationListener enl)
addEndNotificationListener in class DataSourcepublic void notifyEndNotificationListeners()
notifyEndNotificationListeners in class DataSourcepublic void removeEndNotificationListener(EndNotificationListener enl)
removeEndNotificationListener in class DataSourceprotected DataSource createEmptyDataSource()
DataSource
createEmptyDataSource in class DataSource
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||