|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.Vector
simtools.data.DataSourceCollection
simtools.data.DynamicDataSourceCollection
public class DynamicDataSourceCollection
| Nested Class Summary | |
|---|---|
protected class |
DynamicDataSourceCollection.SourceInfo
This class contains info necessary to handle the data sources. |
| Nested classes/interfaces inherited from class simtools.data.DataSourceCollection |
|---|
DataSourceCollection.Container |
| Field Summary | |
|---|---|
protected DataInfo |
ourInfo
|
protected DynamicDataSourceCollection.SourceInfo[] |
sourceInfo
|
| Fields inherited from class simtools.data.DataSourceCollection |
|---|
buffers, endNotificationListeners, lastIndex, listeners, map, startIndex |
| Fields inherited from class java.util.Vector |
|---|
capacityIncrement, elementCount, elementData |
| Fields inherited from class java.util.AbstractList |
|---|
modCount |
| Constructor Summary | |
|---|---|
DynamicDataSourceCollection()
|
|
| Method Summary | |
|---|---|
void |
bufferize(Buffer b)
Public method to put a buffer on a data source |
void |
bufferize(int i)
Public method to put a buffer on a data source. |
void |
bufferize(int i,
Buffer b)
Public method to put a buffer on a data source |
protected void |
changeDataSourceInfo(DataSource ds,
DataInfo di)
Change the information relative to a datasource. |
protected void |
changeInfo(DataInfo di)
Change our own information. |
long |
computeLastIndex(int i)
|
java.lang.Object |
computeMax(int i)
|
java.lang.Object |
computeMin(int i)
|
long |
computeStartIndex(int i)
|
protected DataSource |
createDataSource(DataInfo info)
|
protected DataSource |
createDataSource(DataInfo info,
int kind)
Add a data source with the given info. |
byte |
getByteMax(int i)
|
byte |
getByteMin(int i)
|
double |
getDoubleMax(int i)
|
double |
getDoubleMin(int i)
|
float |
getFloatMax(int i)
|
float |
getFloatMin(int i)
|
DataInfo |
getInformation()
|
DataInfo |
getInformation(int i)
Other functions have a reasonable default implementation |
int |
getIntegerMax(int i)
|
int |
getIntegerMin(int i)
|
int |
getKind(int i)
Kind of the data source at position i, Object by default |
long |
getLastIndex(int i)
|
long |
getLongMax(int i)
|
long |
getLongMin(int i)
|
java.lang.Object |
getMax(int i)
|
java.lang.Object |
getMin(int i)
|
short |
getShortMax(int i)
|
short |
getShortMin(int i)
|
long |
getStartIndex(int i)
|
java.lang.Object |
getValue(int i,
long index)
Methods for subclasses to specialize |
boolean |
isComparable(int i)
|
protected void |
registerNewValues()
Call this function once you have set up all the values with setValue. |
protected void |
removeDataSource(DataSource ds)
|
protected void |
removeDataSource(int i)
Remove the given data source. |
protected void |
setByteValue(int dsnum,
byte v)
Sets the value of the Datasource numbered dsnum to the byte v Once you call this function, you should not add/remove any datasource so long as you haven't called registerNewValues(). |
protected void |
setDoubleValue(int dsnum,
double v)
Sets the value of the Datasource numbered dsnum to the double v Once you call this function, you should not add/remove any datasource so long as you haven't called registerNewValues(). |
protected void |
setFloatValue(int dsnum,
float v)
Sets the value of the Datasource numbered dsnum to the float v Once you call this function, you should not add/remove any datasource so long as you haven't called registerNewValues(). |
protected void |
setIntegerValue(int dsnum,
int v)
Sets the value of the Datasource numbered dsnum to the int v Once you call this function, you should not add/remove any datasource so long as you haven't called registerNewValues(). |
protected void |
setLongValue(int dsnum,
long v)
Sets the value of the Datasource numbered dsnum to the long v Once you call this function, you should not add/remove any datasource so long as you haven't called registerNewValues(). |
protected void |
setObjectValue(int dsnum,
java.lang.Object v)
Sets the value of the Datasource numbered dsnum to the Object v Once you call this function, you should not add/remove any datasource so long as you haven't called registerNewValues(). |
protected void |
setShortValue(int dsnum,
short v)
Sets the value of the Datasource numbered dsnum to the short v Once you call this function, you should not add/remove any datasource so long as you haven't called registerNewValues(). |
java.lang.Class |
valueClass(int i)
Returns the more specialized superclass of all objects returned by the i-th data source. |
| Methods inherited from class java.util.Vector |
|---|
add, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, remove, removeAll, removeElement, removeElementAt, removeRange, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, toString, trimToSize |
| Methods inherited from class java.util.AbstractList |
|---|
iterator, listIterator, listIterator |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.List |
|---|
iterator, listIterator, listIterator |
| Field Detail |
|---|
protected DynamicDataSourceCollection.SourceInfo[] sourceInfo
protected DataInfo ourInfo
| Constructor Detail |
|---|
public DynamicDataSourceCollection()
| Method Detail |
|---|
public void bufferize(Buffer b)
throws UnsupportedOperation
DataSourceCollection
bufferize in class DataSourceCollectionb - The buffer to use. It must have been created using a null
provider. The buffer will then be cloned and applied to all
datasources using the bufferize(int,Buffer) function.
UnsupportedOperation
public void bufferize(int i,
Buffer b)
throws UnsupportedOperation
DataSourceCollection
bufferize in class DataSourceCollectioni - The position of the datasource to bufferizeb - The buffer to use. It must have been created using the
datasource at position i, or a null provider (in which case,
the datasource at position i will be used automatically). An
UnsupportedOperation exception is thrown otherwise.
UnsupportedOperation
public void bufferize(int i)
throws UnsupportedOperation
DataSourceCollection
bufferize in class DataSourceCollectioni - The position of the datasource to bufferize
UnsupportedOperationpublic DataInfo getInformation(int i)
getInformation in class DataSourceCollection
public java.lang.Object getMin(int i)
throws UnsupportedOperation
getMin in class DataSourceCollectionUnsupportedOperation
public java.lang.Object getMax(int i)
throws UnsupportedOperation
getMax in class DataSourceCollectionUnsupportedOperation
public byte getByteMin(int i)
throws DataException
getByteMin in class DataSourceCollectionDataException
public byte getByteMax(int i)
throws DataException
getByteMax in class DataSourceCollectionDataException
public short getShortMin(int i)
throws DataException
getShortMin in class DataSourceCollectionDataException
public short getShortMax(int i)
throws DataException
getShortMax in class DataSourceCollectionDataException
public int getIntegerMin(int i)
throws DataException
getIntegerMin in class DataSourceCollectionDataException
public int getIntegerMax(int i)
throws DataException
getIntegerMax in class DataSourceCollectionDataException
public long getLongMin(int i)
throws DataException
getLongMin in class DataSourceCollectionDataException
public long getLongMax(int i)
throws DataException
getLongMax in class DataSourceCollectionDataException
public float getFloatMin(int i)
throws DataException
getFloatMin in class DataSourceCollectionDataException
public float getFloatMax(int i)
throws DataException
getFloatMax in class DataSourceCollectionDataException
public double getDoubleMin(int i)
throws DataException
getDoubleMin in class DataSourceCollectionDataException
public double getDoubleMax(int i)
throws DataException
getDoubleMax in class DataSourceCollectionDataException
public java.lang.Object computeMin(int i)
throws UnsupportedOperation
computeMin in class DataSourceCollectionUnsupportedOperation
public java.lang.Object computeMax(int i)
throws UnsupportedOperation
computeMax in class DataSourceCollectionUnsupportedOperationpublic boolean isComparable(int i)
isComparable in class DataSourceCollectionpublic long getStartIndex(int i)
getStartIndex in class DataSourceCollectionpublic long getLastIndex(int i)
getLastIndex in class DataSourceCollectionpublic long computeStartIndex(int i)
computeStartIndex in class DataSourceCollectionpublic long computeLastIndex(int i)
computeLastIndex in class DataSourceCollectionprotected DataSource createDataSource(DataInfo info)
protected DataSource createDataSource(DataInfo info,
int kind)
info - Any information that will describe the data source, null is possible but
not recommended.kind - the data source kind, see ValueProvider. Object is default.
protected void removeDataSource(int i)
ds - The data source to removeprotected void removeDataSource(DataSource ds)
protected void changeDataSourceInfo(DataSource ds,
DataInfo di)
protected void changeInfo(DataInfo di)
protected void setByteValue(int dsnum,
byte v)
dsnum - v - the byte value to set
protected void setShortValue(int dsnum,
short v)
dsnum - v - the short value to set
protected void setIntegerValue(int dsnum,
int v)
dsnum - v - the int value to set
protected void setLongValue(int dsnum,
long v)
dsnum - v - the long value to set
protected void setFloatValue(int dsnum,
float v)
dsnum - v - the float value to set
protected void setDoubleValue(int dsnum,
double v)
dsnum - v - the double value to set
protected void setObjectValue(int dsnum,
java.lang.Object v)
dsnum - v - the Object value to setprotected void registerNewValues()
dsnum - v - public DataInfo getInformation()
getInformation in class DataSourceCollection
public java.lang.Object getValue(int i,
long index)
throws DataException
DataSourceCollection
getValue in class DataSourceCollectionDataExceptionpublic int getKind(int i)
DataSourceCollection
getKind in class DataSourceCollectionpublic java.lang.Class valueClass(int i)
DataSourceCollection
valueClass in class DataSourceCollection
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||