public class OwnedVector extends Vector implements CopyFrom
Modifier and Type | Field and Description |
---|---|
Object |
owner |
capacityIncrement, elementCount, elementData
serialVersionUID
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, trimToSize
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
equals, hashCode
public 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 Vector
public final void addElement(Object obj)
Vector
addElement
in class Vector
obj
- The object to add.public final boolean add(Object element)
Vector
add
in interface Collection
add
in class Vector
element
- the element to add.public final void setElementAt(Object obj, int index)
setElementAt
in class Vector
public final boolean addAll(Collection c)
Collection
addAll
in interface Collection
addAll
in class Vector
c
- 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)