|
|||||||||
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 DataSource
UnsupportedOperation
public long getLastIndex() throws UnsupportedOperation
getLastIndex
in class DataSource
UnsupportedOperation
public void setSlice(long min, long max)
DataSource
setSlice
in class DataSource
public java.lang.Object getMin() throws UnsupportedOperation
DataSource
getMin
in class DataSource
UnsupportedOperation
public java.lang.Object getMax() throws UnsupportedOperation
getMax
in class DataSource
UnsupportedOperation
public java.lang.Object getValue(long index) throws DataException
getValue
in class ValueProvider
DataException
public byte getByteValue(long index) throws DataException
ValueProvider
getByteValue
in class ValueProvider
DataException
public byte getByteMin() throws DataException
getByteMin
in class DataSource
DataException
public byte getByteMax() throws DataException
getByteMax
in class DataSource
DataException
public short getShortValue(long index) throws DataException
ValueProvider
getShortValue
in class ValueProvider
DataException
public short getShortMin() throws DataException
getShortMin
in class DataSource
DataException
public short getShortMax() throws DataException
getShortMax
in class DataSource
DataException
public int getIntegerValue(long index) throws DataException
ValueProvider
getIntegerValue
in class ValueProvider
DataException
public int getIntegerMin() throws DataException
getIntegerMin
in class DataSource
DataException
public int getIntegerMax() throws DataException
getIntegerMax
in class DataSource
DataException
public long getLongValue(long index) throws DataException
ValueProvider
getLongValue
in class ValueProvider
DataException
public long getLongMin() throws DataException
getLongMin
in class DataSource
DataException
public long getLongMax() throws DataException
getLongMax
in class DataSource
DataException
public float getFloatValue(long index) throws DataException
ValueProvider
getFloatValue
in class ValueProvider
DataException
public float getFloatMin() throws DataException
getFloatMin
in class DataSource
DataException
public float getFloatMax() throws DataException
getFloatMax
in class DataSource
DataException
public double getDoubleValue(long index) throws DataException
ValueProvider
getDoubleValue
in class ValueProvider
DataException
public double getDoubleMin() throws DataException
getDoubleMin
in class DataSource
DataException
public double getDoubleMax() throws DataException
getDoubleMax
in class DataSource
DataException
public java.lang.Object computeMin() throws UnsupportedOperation
computeMin
in class DataSource
UnsupportedOperation
public java.lang.Object computeMax() throws UnsupportedOperation
computeMax
in class DataSource
UnsupportedOperation
public long computeStartIndex() throws UnsupportedOperation
computeStartIndex
in class DataSource
UnsupportedOperation
public long computeLastIndex() throws UnsupportedOperation
computeLastIndex
in class DataSource
UnsupportedOperation
public int getKind()
ValueProvider
getKind
in class ValueProvider
public int sortedOrder()
DataSource
sortedOrder
in class DataSource
public boolean isComparable()
DataSource
isComparable
in class DataSource
public void addEndNotificationListener(EndNotificationListener enl)
addEndNotificationListener
in class DataSource
public void notifyEndNotificationListeners()
notifyEndNotificationListeners
in class DataSource
public void removeEndNotificationListener(EndNotificationListener enl)
removeEndNotificationListener
in class DataSource
protected DataSource createEmptyDataSource()
DataSource
createEmptyDataSource
in class DataSource
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |