Overview | Package | Class | Use | Tree | Deprecated | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## ru.biosoft.access
Class VectorDataCollection

    java.lang.Object
      ru.biosoft.access.DataElementSupport
          ru.biosoft.access.AbstractDataCollection
              ru.biosoft.access.VectorDataCollection

All Implemented Interfaces:
  DataCollection, DataElement

Direct Known Subclasses:
  DataCollectionUnion2, FileCollection, HostObjectInfo, LocalRepository, Plugins, SbwModule, SbwService, SbwServiceCategory

public class VectorDataCollection
extends AbstractDataCollection

DataCollection based on `Vector` ( DataElement's is stored in Vector ).

Field Summary
`static int` | `INITIAL_SIZE` Initial capacity of this collection.
`protected java.util.Vector` | `vector` Back-end storage for data elements.

Fields inherited from class ru.biosoft.access.AbstractDataCollection
`cat, info, notificationEnabled, path, propagationEnabled, v_cache`

Fields inherited from interface ru.biosoft.access.DataCollection
`CHILDREN_NODE_IMAGE, CHILDREN_NODE_VISIBLE, CLASS_PROPERTY, CLASSPATH_JAR_PROPERTY, COMPARATOR_OBJECT, CONFIG_FILE_PROPERTY, CONFIG_PATH_PROPERTY, DATA_ELEMENT_CLASS_PROPERTY, DEFAULT_CONFIG_FILE, DEFAULT_CONFIG_SUFFIX, DEFAULT_FILTER_CONFIG_SUFFIX, DEFAULT_FORMAT_CONFIG_SUFFIX, DEFAULT_NODE_CONFIG_SUFFIX, DEFAULT_REPOSITORY, DESCRIPTION_PROPERTY, DISPLAY_NAME_PROPERTY, FILE_PATH_PROPERTY, FILE_PROPERTY, FILTER_PROPERTY, ID_FORMAT, IS_ROOT, JOB_CONTROL_PROPERTY, LATE_CHILDREN_INITIALIZATION, MUTABLE, NAME_PROPERTY, NEXT_CONFIG, NODE_IMAGE, NODE_VISIBLE, PRIMARY_COLLECTION, REMOVE_CHILDREN, TRANSFORMER_CLASS`

Constructor Summary
`VectorDataCollection(DataCollection parent, java.util.Properties properties)` Constructor to be used by `CollectionFactory` to create VectorDataCollection.
`VectorDataCollection(java.lang.String name, DataCollection parent, java.util.Properties properties)` Constructs data collection with specified name and parent.

Method Summary
`void` | `close()` Removes all of the elements from this data collection.
`protected DataElement` | `doGet(java.lang.String name)` Returns the element with the specified name from this data collection.
`protected void` | `doPut(DataElement dataElement, boolean isNew)` Add the specified element to this data collection.
`protected void` | `doRemove(java.lang.String name)` Removes the specified data element from this data collection.
`DataElement` | `getAt(int index)` Returns the element at the specified position in this data collection.
`java.util.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.
`java.util.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.
`java.lang.Object[]` | `toArray(java.lang.Object[] a)` Returns an array containing all of the elements in this VectorDataCollection in the correct order; the runtime type of the returned array is that of the specified array.

Methods inherited from class ru.biosoft.access.AbstractDataCollection
`addDataCollectionListener, cachePut, checkMutable, contains, contains, doAddPostNotify, doAddPreNotify, doRemovePostNotify, doRemovePreNotify, finalize, fireElementAdded, fireElementChanged, fireElementRemoved, fireElementWillAdd, fireElementWillChange, fireElementWillRemove, get, getCompleteName, getDataElementType, getDescription, getInfo, initLog, isMutable, isNotificationEnabled, isPropagationEnabled, makeInfo, propagateElementChanged, propagateElementWillChange, registerRoot, release, remove, removeDataCollectionListener, setNotificationEnabled, setPropagationEnabled, toString`

Methods inherited from class ru.biosoft.access.DataElementSupport
`getName, getOrigin, registerConstructorWithBadEqual`

Methods inherited from class java.lang.Object
`clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Methods inherited from interface ru.biosoft.access.DataElement
`getName, getOrigin`

Field Detail

### INITIAL_SIZE

    public static final int INITIAL_SIZE

  Initial capacity of this collection.

  See Also:
    Constant Field Values

### vector

    protected java.util.Vector vector

  Back-end storage for data elements.

Constructor Detail

### VectorDataCollection

    public VectorDataCollection(DataCollection parent,
                                java.util.Properties properties)

  Constructor to be used by `CollectionFactory` to create VectorDataCollection.
  Required properties.
  - `DataCollection.NAME_PROPERTY`

Parameters:
  `parent` - parent DataCollection
  `properties` - set of properties

### VectorDataCollection

    public VectorDataCollection(java.lang.String name,
                                DataCollection parent,
                                java.util.Properties properties)

  Constructs data collection with specified name and parent.

Parameters:
  `parent` - Parent for this data collection.
  `properties` - Properties to initialise `DataCollectionInfo`. Can be null.

Method Detail

### toArray

    public java.lang.Object[] toArray(java.lang.Object[] a)

  Returns an array containing all of the elements in this VectorDataCollection in the correct order; the runtime type of the returned array is that of the specified array.

  See Also:
    `Vector.toArray(Object[] a)`

### getSize

    public int getSize()

  Returns the number of `data elements` in this data collection.

  Specified by:
    `getSize` in interface `DataCollection`
  Overrides:
    `getSize` in class `AbstractDataCollection`
  Returns:
    the number of data elements in this data collection.

### iterator

    public java.util.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.

  Specified by:
    `put` in interface `DataCollection`
  Overrides:
    `put` in class `AbstractDataCollection`
  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:
    `java.lang.IllegalArgumentException` - if dataElement is `null`.
    `java.lang.Exception` - If any error occurs.
  See Also:
    `AbstractDataCollection.put(DataElement)`

### close

    public void close()
               throws java.lang.Exception

  Removes all of the elements from this data collection.

  Specified by:
    `close` in interface `DataCollection`
  Overrides:
    `close` in class `AbstractDataCollection`
  Throws:
    `Never` - throws any exception.
    `java.lang.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:
    `java.lang.IndexOutOfBoundsException` - if the index is out of range (index < 0 || index >= getSize()).

### getNameList

    public java.util.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.

  Specified by:
    `getNameList` in interface `DataCollection`
  Overrides:
    `getNameList` in class `AbstractDataCollection`
  Returns:
    Names of all elements in this data collection in alphabetically sorted order.

### doGet

    protected DataElement doGet(java.lang.String name)

  Returns the element with the specified name from this data collection.

  Overrides:
    `doGet` in class `AbstractDataCollection`
  Parameters:
    `name` - name of element to return.
  Returns:
    the element with the specified name in this data collection.
  See Also:
    `AbstractDataCollection.get(String)`

### doPut

    protected void doPut(DataElement dataElement,
                         boolean isNew)
                  throws java.lang.Exception

  Add the specified element to this data collection.

  Overrides:
    `doPut` in class `AbstractDataCollection`
  Parameters:
    `dataElement` - element to be added to this data collection.
    `isNew` - indicates whether this dataElement is new.
  Throws:
    `java.lang.IllegalArgumentException` - if dataElement is `null`.
    `java.lang.Exception` - If any error occurs.
  See Also:
    `AbstractDataCollection.put(DataElement)`

### doRemove

    protected void doRemove(java.lang.String name)
                     throws java.lang.Exception

  Removes the specified data element from this data collection.

  Overrides:
    `doRemove` in class `AbstractDataCollection`
  Throws:
    `java.lang.Exception` - If any error occurs.
  See Also:
    `AbstractDataCollection.remove(String)`

Overview | Package | Class | Use | Tree | Deprecated | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2003 Biosof.Ru. All Rights Reserved.