T - Type of the target of all elements of the array (vector).public class WeakReferenceVector<T extends WeakReferenceTarget> extends Object
Represents a variable array (vector) of weak references and provides a means to resolve them at runtime. The class provides a consistent set of delegate append, prepend, get, contains and remove methods for weak reference vector type properties.
If the array of references is persisted via an object relational mapping, the methods of this class ensure the order of that array is preserved.
| Constructor and Description |
|---|
WeakReferenceVector() |
| Modifier and Type | Method and Description |
|---|---|
void |
append(T item) |
void |
append(WeakReference<T> reference) |
void |
clear() |
boolean |
contains(T item) |
int |
count() |
static void |
generateWeakReferenceORM(Node parent,
String namespace,
String prefix) |
T |
getAt(int index) |
List<T> |
getOptionalList() |
long |
getPersistentID() |
List<T> |
getRequiredList() |
void |
insert(int index,
T item) |
void |
prepend(T item) |
boolean |
remove(T essenceKind) |
void |
removeAt(int index) |
public void append(T item) throws NullPointerException
NullPointerExceptionpublic void append(WeakReference<T> reference) throws NullPointerException
NullPointerExceptionpublic void prepend(T item) throws NullPointerException
NullPointerExceptionpublic void insert(int index,
T item)
throws NullPointerException,
IndexOutOfBoundsException
public List<T> getOptionalList() throws PropertyNotPresentException
PropertyNotPresentExceptionpublic boolean contains(T item)
public T getAt(int index) throws IndexOutOfBoundsException
IndexOutOfBoundsExceptionpublic void removeAt(int index)
public boolean remove(T essenceKind) throws NullPointerException
NullPointerExceptionpublic void clear()
public int count()
public long getPersistentID()
(c)2007-2016 Richard Cartwright, all rights reserved. Licensed under Apache 2 license and subject to the AMWA IPR policy.