|
|||||||||
| 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 DataSourcepublic Buffer getBuffer()
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 short getShortValue(long index)
throws DataException
ValueProvider
getShortValue in class ValueProviderDataException
public int getIntegerValue(long index)
throws DataException
ValueProvider
getIntegerValue in class ValueProviderDataException
public long getLongValue(long index)
throws DataException
ValueProvider
getLongValue in class ValueProviderDataException
public float getFloatValue(long index)
throws DataException
ValueProvider
getFloatValue in class ValueProviderDataException
public double getDoubleValue(long index)
throws DataException
ValueProvider
getDoubleValue in class ValueProviderDataException
public void setSlice(long min,
long max)
DataSource
setSlice in class DataSourcepublic DataInfo getInformation()
getInformation 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 byte getByteMin()
throws DataException
getByteMin in class DataSourceDataException
public byte getByteMax()
throws DataException
getByteMax in class DataSourceDataException
public short getShortMin()
throws DataException
getShortMin in class DataSourceDataException
public short getShortMax()
throws DataException
getShortMax in class DataSourceDataException
public int getIntegerMin()
throws DataException
getIntegerMin in class DataSourceDataException
public int getIntegerMax()
throws DataException
getIntegerMax in class DataSourceDataException
public long getLongMin()
throws DataException
getLongMin in class DataSourceDataException
public long getLongMax()
throws DataException
getLongMax in class DataSourceDataException
public float getFloatMin()
throws DataException
getFloatMin in class DataSourceDataException
public float getFloatMax()
throws DataException
getFloatMax in class DataSourceDataException
public double getDoubleMin()
throws DataException
getDoubleMin in class DataSourceDataException
public double getDoubleMax()
throws DataException
getDoubleMax in class DataSourceDataException
public long getStartIndex()
throws UnsupportedOperation
getStartIndex in class DataSourceUnsupportedOperation
public long getLastIndex()
throws UnsupportedOperation
getLastIndex in class DataSourceUnsupportedOperation
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 sortedOrder()
DataSource
sortedOrder in class DataSourcepublic boolean isComparable()
DataSource
isComparable in class DataSourcepublic void addListener(DataSourceListener dsl)
addListener in class DataSource
public void notifyListenersForIndexRangeChange(long startIndex,
long lastIndex)
notifyListenersForIndexRangeChange in class DataSourcepublic void notifyListenersForInfoChange(DataInfo newInfo)
notifyListenersForInfoChange in class DataSourcepublic void notifyListenersForOrderChange(int newOrder)
notifyListenersForOrderChange in class DataSource
public void notifyListenersForValueChange(long minIndex,
long maxIndex)
notifyListenersForValueChange in class DataSourcepublic void notifyListenersForValueRangeChange()
notifyListenersForValueRangeChange in class DataSourcepublic void notifyListenersForDataReplaced(DataSource newData)
notifyListenersForDataReplaced in class DataSourcepublic void removeListener(DataSourceListener dsl)
removeListener in class DataSourcepublic void addEndNotificationListener(EndNotificationListener enl)
addEndNotificationListener in class DataSourcepublic void notifyEndNotificationListeners()
DataSource
notifyEndNotificationListeners in class DataSourcepublic void removeEndNotificationListener(EndNotificationListener enl)
removeEndNotificationListener in class DataSource
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||