ELEMENTTYPE - The type of the elements in the list@ThreadSafe public class SafeVector<ELEMENTTYPE> extends Vector<ELEMENTTYPE> implements IHasSize
Vector that can handle read accesses on list
items that are not yet in the container. If get(int) is called with
an index that would normally throw an ArrayIndexOutOfBoundsException
this class will fill all indices between the current Vector.size() and the
desired index with values provided by an IFactory. If you don't pass
an IFactory in the constructor a default factory returning null
values is used.capacityIncrement, elementCount, elementDatamodCount| Constructor and Description |
|---|
SafeVector() |
SafeVector(IFactory<ELEMENTTYPE> aFactory) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
ELEMENTTYPE |
get(int nIndex) |
int |
hashCode() |
ELEMENTTYPE |
set(int nIndex,
ELEMENTTYPE aElement) |
String |
toString() |
add, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, firstElement, indexOf, indexOf, insertElementAt, isEmpty, iterator, lastElement, lastIndexOf, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeRange, retainAll, setElementAt, setSize, size, subList, toArray, toArray, trimToSizepublic SafeVector()
public SafeVector(@Nonnull IFactory<ELEMENTTYPE> aFactory)
public ELEMENTTYPE get(@Nonnegative int nIndex)
get in interface List<ELEMENTTYPE>get in class Vector<ELEMENTTYPE>public ELEMENTTYPE set(@Nonnegative int nIndex, @Nonnull ELEMENTTYPE aElement)
set in interface List<ELEMENTTYPE>set in class Vector<ELEMENTTYPE>public boolean equals(Object o)
equals in interface Collection<ELEMENTTYPE>equals in interface List<ELEMENTTYPE>equals in class Vector<ELEMENTTYPE>public int hashCode()
hashCode in interface Collection<ELEMENTTYPE>hashCode in interface List<ELEMENTTYPE>hashCode in class Vector<ELEMENTTYPE>public String toString()
toString in class Vector<ELEMENTTYPE>Copyright © 2006–2014 phloc systems. All rights reserved.