|
|||||||||
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.buffer.BufferedDataSource
public class BufferedDataSource
A data source providing a buffering service Designed to be a wrapper around a DataSource, somewhat like what's done for the java InputStreams.
Field Summary | |
---|---|
protected Buffer |
buffer
|
DataSource |
dataSource
|
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 | |
---|---|
BufferedDataSource(Buffer b)
|
|
BufferedDataSource(DataSource ds)
|
|
BufferedDataSource(DataSource ds,
int bufferSize)
|
Method Summary | |
---|---|
void |
addEndNotificationListener(EndNotificationListener enl)
|
void |
addListener(DataSourceListener dsl)
|
long |
computeLastIndex()
|
java.lang.Object |
computeMax()
|
java.lang.Object |
computeMin()
Force the computation if possible. |
long |
computeStartIndex()
|
boolean |
equals(java.lang.Object obj)
|
Buffer |
getBuffer()
|
byte |
getByteMax()
|
byte |
getByteMin()
|
byte |
getByteValue(long index)
Optimized accessor for byte values. |
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()
|
int |
getIntegerMax()
|
int |
getIntegerMin()
|
int |
getIntegerValue(long index)
Optimized accessor for int values. |
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. |
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()
Use this method only when this data source is the referer. |
void |
notifyListenersForDataReplaced(DataSource newData)
|
void |
notifyListenersForIndexRangeChange(long startIndex,
long lastIndex)
|
void |
notifyListenersForInfoChange(DataInfo newInfo)
|
void |
notifyListenersForOrderChange(int newOrder)
|
void |
notifyListenersForValueChange(long minIndex,
long maxIndex)
|
void |
notifyListenersForValueRangeChange()
|
void |
removeEndNotificationListener(EndNotificationListener enl)
|
void |
removeListener(DataSourceListener dsl)
|
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.DataSource |
---|
computeSortedOrder, createEmptyDataSource, getAuxiliarySources, getChoiceFormat, getDataSourceInformationClass, getSortedOrder, getSourceDependencies, isAuxiliary, isCompound, notifyListenersForDataReplaced, updateSortedOrder |
Methods inherited from class simtools.data.ValueProvider |
---|
getKind, getObjectValue, valueClass |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Buffer buffer
public DataSource dataSource
Constructor Detail |
---|
public BufferedDataSource(DataSource ds)
public BufferedDataSource(DataSource ds, int bufferSize)
public BufferedDataSource(Buffer b)
Method Detail |
---|
public boolean equals(java.lang.Object obj)
equals
in class DataSource
public Buffer getBuffer()
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 short getShortValue(long index) throws DataException
ValueProvider
getShortValue
in class ValueProvider
DataException
public int getIntegerValue(long index) throws DataException
ValueProvider
getIntegerValue
in class ValueProvider
DataException
public long getLongValue(long index) throws DataException
ValueProvider
getLongValue
in class ValueProvider
DataException
public float getFloatValue(long index) throws DataException
ValueProvider
getFloatValue
in class ValueProvider
DataException
public double getDoubleValue(long index) throws DataException
ValueProvider
getDoubleValue
in class ValueProvider
DataException
public void setSlice(long min, long max)
DataSource
setSlice
in class DataSource
public DataInfo getInformation()
getInformation
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 byte getByteMin() throws DataException
getByteMin
in class DataSource
DataException
public byte getByteMax() throws DataException
getByteMax
in class DataSource
DataException
public short getShortMin() throws DataException
getShortMin
in class DataSource
DataException
public short getShortMax() throws DataException
getShortMax
in class DataSource
DataException
public int getIntegerMin() throws DataException
getIntegerMin
in class DataSource
DataException
public int getIntegerMax() throws DataException
getIntegerMax
in class DataSource
DataException
public long getLongMin() throws DataException
getLongMin
in class DataSource
DataException
public long getLongMax() throws DataException
getLongMax
in class DataSource
DataException
public float getFloatMin() throws DataException
getFloatMin
in class DataSource
DataException
public float getFloatMax() throws DataException
getFloatMax
in class DataSource
DataException
public double getDoubleMin() throws DataException
getDoubleMin
in class DataSource
DataException
public double getDoubleMax() throws DataException
getDoubleMax
in class DataSource
DataException
public long getStartIndex() throws UnsupportedOperation
getStartIndex
in class DataSource
UnsupportedOperation
public long getLastIndex() throws UnsupportedOperation
getLastIndex
in class DataSource
UnsupportedOperation
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 sortedOrder()
DataSource
sortedOrder
in class DataSource
public boolean isComparable()
DataSource
isComparable
in class DataSource
public void addListener(DataSourceListener dsl)
addListener
in class DataSource
public void notifyListenersForIndexRangeChange(long startIndex, long lastIndex)
notifyListenersForIndexRangeChange
in class DataSource
public void notifyListenersForInfoChange(DataInfo newInfo)
notifyListenersForInfoChange
in class DataSource
public void notifyListenersForOrderChange(int newOrder)
notifyListenersForOrderChange
in class DataSource
public void notifyListenersForValueChange(long minIndex, long maxIndex)
notifyListenersForValueChange
in class DataSource
public void notifyListenersForValueRangeChange()
notifyListenersForValueRangeChange
in class DataSource
public void notifyListenersForDataReplaced(DataSource newData)
notifyListenersForDataReplaced
in class DataSource
public void removeListener(DataSourceListener dsl)
removeListener
in class DataSource
public void addEndNotificationListener(EndNotificationListener enl)
addEndNotificationListener
in class DataSource
public void notifyEndNotificationListeners()
DataSource
notifyEndNotificationListeners
in class DataSource
public void removeEndNotificationListener(EndNotificationListener enl)
removeEndNotificationListener
in class DataSource
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |