com.planet_ink.coffee_mud.core.collections
Class PairVector<T,K>

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.Vector<Pair<T,K>>
              extended by com.planet_ink.coffee_mud.core.collections.PairVector<T,K>
All Implemented Interfaces:
PairList<T,K>, java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<Pair<T,K>>, java.util.Collection<Pair<T,K>>, java.util.List<Pair<T,K>>, java.util.RandomAccess

public class PairVector<T,K>
extends java.util.Vector<Pair<T,K>>
implements PairList<T,K>

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
PairVector()
           
PairVector(int x)
           
PairVector(java.util.List<Pair<T,K>> initial)
           
 
Method Summary
 void add(T t, K k)
           
 void addElement(T t, K k)
           
 boolean contains(java.lang.Object o)
           
 boolean containsFirst(T t)
           
 boolean containsSecond(K k)
           
 T elementAtFirst(int index)
           
 K elementAtSecond(int index)
           
 java.util.Enumeration<T> firstElements()
           
 T firstFirstElement(int index)
           
 java.util.Iterator<T> firstIterator()
           
 K firstSecondElement(int index)
           
 T getFirst(int index)
           
 Pair.FirstConverter<T,K> getFirstConverter()
           
 K getSecond(int index)
           
 Pair.SecondConverter<T,K> getSecondConverter()
           
 int indexOf(java.lang.Object o)
           
 int indexOf(java.lang.Object o, int index)
           
 int indexOfFirst(T t)
           
 int indexOfFirst(T t, int index)
           
 int indexOfSecond(K k)
           
 int indexOfSecond(K k, int index)
           
 T lastFirstElement(int index)
           
 int lastIndexOfFirst(T t)
           
 int lastIndexOfFirst(T t, int index)
           
 int lastIndexOfSecond(K k)
           
 int lastIndexOfSecond(K k, int index)
           
 K lastSecondElement(int index)
           
 boolean removeElementFirst(T t)
           
 boolean removeElementSecond(K k)
           
 boolean removeFirst(T t)
           
 boolean removeSecond(K k)
           
 java.util.Enumeration<K> secondElements()
           
 java.util.Iterator<K> secondIterator()
           
 T[] toArrayFirst(T[] objs)
           
 K[] toArraySecond(K[] objs)
           
 
Methods inherited from class java.util.Vector
add, add, addAll, addAll, addElement, capacity, clear, clone, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, hashCode, 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
add, add, addAll, addAll, clear, containsAll, equals, get, hashCode, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, size, subList, toArray, toArray
 

Constructor Detail

PairVector

public PairVector(java.util.List<Pair<T,K>> initial)

PairVector

public PairVector()

PairVector

public PairVector(int x)
Method Detail

getFirstConverter

public Pair.FirstConverter<T,K> getFirstConverter()
Specified by:
getFirstConverter in interface PairList<T,K>

getSecondConverter

public Pair.SecondConverter<T,K> getSecondConverter()
Specified by:
getSecondConverter in interface PairList<T,K>

firstElements

public java.util.Enumeration<T> firstElements()

secondElements

public java.util.Enumeration<K> secondElements()

firstIterator

public java.util.Iterator<T> firstIterator()
Specified by:
firstIterator in interface PairList<T,K>

secondIterator

public java.util.Iterator<K> secondIterator()
Specified by:
secondIterator in interface PairList<T,K>

indexOfFirst

public int indexOfFirst(T t)
Specified by:
indexOfFirst in interface PairList<T,K>

indexOfSecond

public int indexOfSecond(K k)
Specified by:
indexOfSecond in interface PairList<T,K>

getFirst

public T getFirst(int index)
Specified by:
getFirst in interface PairList<T,K>

getSecond

public K getSecond(int index)
Specified by:
getSecond in interface PairList<T,K>

add

public void add(T t,
                K k)
Specified by:
add in interface PairList<T,K>

addElement

public void addElement(T t,
                       K k)

contains

public boolean contains(java.lang.Object o)
Specified by:
contains in interface java.util.Collection<Pair<T,K>>
Specified by:
contains in interface java.util.List<Pair<T,K>>
Overrides:
contains in class java.util.Vector<Pair<T,K>>

indexOf

public int indexOf(java.lang.Object o)
Specified by:
indexOf in interface java.util.List<Pair<T,K>>
Overrides:
indexOf in class java.util.Vector<Pair<T,K>>

indexOf

public int indexOf(java.lang.Object o,
                   int index)
Overrides:
indexOf in class java.util.Vector<Pair<T,K>>

containsFirst

public boolean containsFirst(T t)
Specified by:
containsFirst in interface PairList<T,K>

containsSecond

public boolean containsSecond(K k)
Specified by:
containsSecond in interface PairList<T,K>

elementAtFirst

public T elementAtFirst(int index)
Specified by:
elementAtFirst in interface PairList<T,K>

elementAtSecond

public K elementAtSecond(int index)
Specified by:
elementAtSecond in interface PairList<T,K>

indexOfFirst

public int indexOfFirst(T t,
                        int index)
Specified by:
indexOfFirst in interface PairList<T,K>

indexOfSecond

public int indexOfSecond(K k,
                         int index)
Specified by:
indexOfSecond in interface PairList<T,K>

lastIndexOfFirst

public int lastIndexOfFirst(T t,
                            int index)
Specified by:
lastIndexOfFirst in interface PairList<T,K>

lastIndexOfSecond

public int lastIndexOfSecond(K k,
                             int index)
Specified by:
lastIndexOfSecond in interface PairList<T,K>

lastIndexOfFirst

public int lastIndexOfFirst(T t)
Specified by:
lastIndexOfFirst in interface PairList<T,K>

lastIndexOfSecond

public int lastIndexOfSecond(K k)
Specified by:
lastIndexOfSecond in interface PairList<T,K>

removeFirst

public boolean removeFirst(T t)
Specified by:
removeFirst in interface PairList<T,K>

removeSecond

public boolean removeSecond(K k)
Specified by:
removeSecond in interface PairList<T,K>

removeElementFirst

public boolean removeElementFirst(T t)
Specified by:
removeElementFirst in interface PairList<T,K>

removeElementSecond

public boolean removeElementSecond(K k)
Specified by:
removeElementSecond in interface PairList<T,K>

firstFirstElement

public T firstFirstElement(int index)

firstSecondElement

public K firstSecondElement(int index)

lastFirstElement

public T lastFirstElement(int index)

lastSecondElement

public K lastSecondElement(int index)

toArrayFirst

public T[] toArrayFirst(T[] objs)
Specified by:
toArrayFirst in interface PairList<T,K>

toArraySecond

public K[] toArraySecond(K[] objs)
Specified by:
toArraySecond in interface PairList<T,K>