com.jme.scene.lod
Class ExVector

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.Vector<java.lang.Object>
              extended by com.jme.scene.lod.ExVector
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<java.lang.Object>, java.util.Collection<java.lang.Object>, java.util.List<java.lang.Object>, java.util.RandomAccess

public class ExVector
extends java.util.Vector<java.lang.Object>

ExVector is an Extended Vector that does not allow multiple instances.

Version:
$Id: ExVector.java 4131 2009-03-19 20:15:28Z blaine.dev $
Author:
Joshua Slack
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.Vector
capacityIncrement, elementCount, elementData
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
ExVector()
          Basic constructor.
ExVector(int initialCapacity)
          Constructor allowing you to set initialCapacity
ExVector(int initialCapacity, int capacityIncrement)
          Constructor allowing you to set initialCapacity
 
Method Summary
 boolean add(java.lang.Object obj)
          Add the given object to the vector if and only if it is not already present.
 java.lang.Object get(java.lang.Object obj)
          Retrieve an object from this vector.
 
Methods inherited from class java.util.Vector
add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeRange, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, toString, trimToSize
 
Methods inherited from class java.util.AbstractList
iterator, listIterator, listIterator
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
iterator, listIterator, listIterator
 

Constructor Detail

ExVector

public ExVector()
Basic constructor.


ExVector

public ExVector(int initialCapacity)
Constructor allowing you to set initialCapacity

Parameters:
initialCapacity - how large of a vector to start with

ExVector

public ExVector(int initialCapacity,
                int capacityIncrement)
Constructor allowing you to set initialCapacity

Parameters:
initialCapacity - how large of a vector to start with
capacityIncrement - how much space to add when we run low
Method Detail

add

public boolean add(java.lang.Object obj)
Add the given object to the vector if and only if it is not already present.

Specified by:
add in interface java.util.Collection<java.lang.Object>
Specified by:
add in interface java.util.List<java.lang.Object>
Overrides:
add in class java.util.Vector<java.lang.Object>
Parameters:
obj - Object to add
Returns:
boolean if the object was added.

get

public java.lang.Object get(java.lang.Object obj)
Retrieve an object from this vector.

Parameters:
obj - the object to retrieve. This uses indexOf to determine location and then get(index) to retrieve it
Returns:
the object if present, null if not.