ru.biosoft.access
Class VectorDataCollection
ru.biosoft.access.DataElementSupport
|
+--ru.biosoft.access.AbstractDataCollection
|
+--ru.biosoft.access.VectorDataCollection
- Direct Known Subclasses:
- DataCollectionUnion2, FileCollection, LocalRepository
- public class VectorDataCollection
- extends AbstractDataCollection
DataCollection based on Vector
( DataElement's is stored in Vector ).
| Field Summary |
final static int | INITIAL_SIZE Initial capacity of this collection. |
| Method Summary |
void | close() Removes all of the elements from this data collection. |
DataElement | getAt(int index) Returns the element at the specified position in this data collection. |
Properties | getInitProperties() |
List | getNameList() Returns an unmodifiable list of the data element names contained in this data collection. |
int | getSize() Returns the number of data elements in this data collection. |
boolean | isMutable() |
Iterator | iterator() Returns an iterator over the elements in this list in alphabetically sorted sequence. |
DataElement | put(DataElement element) Add the specified element to this data collection. |
| Methods inherited from class ru.biosoft.access.AbstractDataCollection |
addDataCollectionListener, contains, contains, get, getCompleteName, getDataElementType, getInfo, init, propagateElementChanged, propagateElementWillChange, remove, removeDataCollectionListener, toString |
INITIAL_SIZE
public final static int INITIAL_SIZE
- Initial capacity of this collection.
VectorDataCollection
public VectorDataCollection(DataCollection parent, Properties properties)
- Constructs an VectorDataCollection object with specified properties.
- Parameters:
- parent - parent DataCollection
- properties - set of properties
close
public void close()
throws java.lang.Exception
- Removes all of the elements from this data collection.
- Throws:
- Never - throws any exception.
getAt
public DataElement getAt(int index)
- Returns the element at the specified position in this data collection.
- Parameters:
- index - index of element to return.
- Returns: the element at the specified position in this data collection.
- Throws:
- IndexOutOfBoundsException - if the index is out of range (index
< 0 || index >= getSize()).
getInitProperties
public Properties getInitProperties()
getNameList
public List getNameList()
- Returns an unmodifiable list of the data element names contained in this data collection.
Query operations on the returned list "read through" to the internal name list,
and attempts to modify the returned list, whether direct or via its iterator,
result in an
UnsupportedOperationException.
The returned list is backed by the data collection,
so changes to the data collection are reflected in the returned list.- Returns: Names of all elements in this data collection in alphabetically sorted order.
getSize
public int getSize()
- Returns the number of data elements in this data collection.
- Returns: the number of data elements in this data collection.
isMutable
public boolean isMutable()
iterator
public Iterator iterator()
- Returns an iterator over the elements in this list in alphabetically sorted sequence.
- Returns: an iterator over the elements in this list in alphabetically sorted sequence.
put
public DataElement put(DataElement element)
throws java.lang.Exception
- Add the specified element to this data collection.
Fire pre/post notify events.
- Parameters:
- element - element to be added to this data collection.
- Returns: the previous data element with same name,
or
null if it did not have one.- Throws:
- IllegalArgumentException - if dataElement is null.
- Exception - If any error occurs.
- See Also:
- AbstractDataCollection.put(ru.biosoft.access.DataElement)
to Class java.util.Vector- Back-end storage for data elements.
to Class java.util.List
- Name list of this data collection.
to Class java.util.Properties
BOTTOM