public class OwnedVector extends Vector implements CopyFrom
| Modifier and Type | Field and Description |
|---|---|
Object |
owner |
capacityIncrement, elementCount, elementDataserialVersionUID| Constructor and Description |
|---|
OwnedVector(Object owner) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(int index,
Object element) |
boolean |
add(Object element)
Add an element to the end of the Vector.
|
boolean |
addAll(Collection c)
Add the contents of a given collection to this collection.
|
boolean |
addAll(int index,
Collection c) |
void |
addElement(Object obj)
Add an element to the end of the Vector.
|
void |
copyFrom(Object aCollection)
This clears this object and then adds copies of the data in aCollection, IF it is a Collection.
|
static Object |
getOwnerOf(Vector v,
Class c)
If the parameter is a Children object then this will return the owner IF it is of the specified class.
|
static Object |
getParentObject(Object data,
Class parentClass)
Go up the chain of parents until a parent with the specified class is found or until no parent is found.
|
void |
insertElementAt(Object obj,
int index) |
Object |
set(int index,
Object element) |
void |
setElementAt(Object obj,
int index) |
protected Object |
wasAdded(Object added) |
capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, firstElement, get, indexOf, indexOf, isEmpty, iterator, lastElement, lastIndexOf, lastIndexOf, remove, removeAll, removeAllElements, removeElement, removeElementAt, retainAll, setSize, size, toArray, toArray, toString, trimToSizeequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitequals, hashCodepublic final Object owner
public OwnedVector(Object owner)
public static final Object getParentObject(Object data, Class parentClass)
data - the data to search for parents.parentClass - the class of the parent to search for or null to return the first parent.public final void insertElementAt(Object obj, int index)
insertElementAt in class Vectorpublic final void addElement(Object obj)
VectoraddElement in class Vectorobj - The object to add.public final boolean add(Object element)
Vectoradd in interface Collectionadd in class Vectorelement - the element to add.public final void setElementAt(Object obj, int index)
setElementAt in class Vectorpublic final boolean addAll(Collection c)
CollectionaddAll in interface CollectionaddAll in class Vectorc - the collection to add.public boolean addAll(int index,
Collection c)
public static Object getOwnerOf(Vector v, Class c)
v - the Vector to check.c - the Class to match the owner with.public void copyFrom(Object aCollection)