com.planet_ink.coffee_mud.core.collections
Class CMUniqSortSVec<T extends CMObject>

java.lang.Object
  extended by com.planet_ink.coffee_mud.core.collections.SVector<T>
      extended by com.planet_ink.coffee_mud.core.collections.CMUniqSortSVec<T>
All Implemented Interfaces:
CList<T>, SearchIDList<T>, java.io.Serializable, java.lang.Iterable<T>, java.util.Collection<T>, java.util.List<T>, java.util.RandomAccess
Direct Known Subclasses:
CMUniqNameSortSVec

public class CMUniqSortSVec<T extends CMObject>
extends SVector<T>
implements SearchIDList<T>

See Also:
Serialized Form

Constructor Summary
CMUniqSortSVec()
           
CMUniqSortSVec(int size)
           
 
Method Summary
 void add(int arg0, T arg1)
           
 boolean add(T arg0)
           
 boolean addAll(int arg0, java.util.Collection<? extends T> arg1)
           
protected  int compareTo(CMObject arg0, CMObject arg1)
           
protected  int compareTo(CMObject arg0, java.lang.String arg1)
           
protected  int compareToStarts(CMObject arg0, java.lang.String arg1)
           
 boolean contains(java.lang.Object arg0)
           
 boolean containsAll(java.util.Collection<?> arg0)
           
 T find(CMObject arg0)
          Searches the sorted list of objects for one with the same ID as the object given.
 T find(java.lang.String arg0)
          Searches the sorted list of objects for one with the given ID;
 T findStartsWith(java.lang.String arg0)
           
 T get(int arg0)
           
 int indexOf(java.lang.Object arg0)
           
 java.util.Iterator<java.lang.String> keyIterator()
          Iterate through the IDs
 int lastIndexOf(java.lang.Object arg0)
           
 boolean remove(java.lang.Object arg0)
           
 T set(int arg0, T arg1)
           
 void setReadOnly(boolean trueFalse)
           
 
Methods inherited from class com.planet_ink.coffee_mud.core.collections.SVector
addAll, addAll, addAll, addAll, addElement, capacity, clear, copyInto, copyOf, elementAt, elements, ensureCapacity, equals, firstElement, hashCode, insertElementAt, isEmpty, iterator, lastElement, listIterator, listIterator, remove, removeAll, removeAll, removeAll, removeAll, removeAllElements, removeElement, removeElementAt, retainAll, setElementAt, setSize, size, subList, toArray, toArray, toVector, trimToSize
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.List
addAll, clear, equals, hashCode, isEmpty, iterator, listIterator, listIterator, remove, removeAll, retainAll, size, subList, toArray, toArray
 

Constructor Detail

CMUniqSortSVec

public CMUniqSortSVec(int size)

CMUniqSortSVec

public CMUniqSortSVec()
Method Detail

compareTo

protected int compareTo(CMObject arg0,
                        java.lang.String arg1)

compareToStarts

protected int compareToStarts(CMObject arg0,
                              java.lang.String arg1)

compareTo

protected int compareTo(CMObject arg0,
                        CMObject arg1)

add

public boolean add(T arg0)
Specified by:
add in interface java.util.Collection<T extends CMObject>
Specified by:
add in interface java.util.List<T extends CMObject>
Overrides:
add in class SVector<T extends CMObject>

add

public void add(int arg0,
                T arg1)
Specified by:
add in interface java.util.List<T extends CMObject>
Overrides:
add in class SVector<T extends CMObject>

addAll

public boolean addAll(int arg0,
                      java.util.Collection<? extends T> arg1)
Specified by:
addAll in interface java.util.List<T extends CMObject>
Overrides:
addAll in class SVector<T extends CMObject>

contains

public boolean contains(java.lang.Object arg0)
Specified by:
contains in interface java.util.Collection<T extends CMObject>
Specified by:
contains in interface java.util.List<T extends CMObject>
Overrides:
contains in class SVector<T extends CMObject>

containsAll

public boolean containsAll(java.util.Collection<?> arg0)
Specified by:
containsAll in interface java.util.Collection<T extends CMObject>
Specified by:
containsAll in interface java.util.List<T extends CMObject>
Overrides:
containsAll in class SVector<T extends CMObject>

keyIterator

public java.util.Iterator<java.lang.String> keyIterator()
Description copied from interface: SearchIDList
Iterate through the IDs

Specified by:
keyIterator in interface SearchIDList<T extends CMObject>
Returns:
the IDs iteration

get

public T get(int arg0)
Specified by:
get in interface java.util.List<T extends CMObject>
Overrides:
get in class SVector<T extends CMObject>

indexOf

public int indexOf(java.lang.Object arg0)
Specified by:
indexOf in interface java.util.List<T extends CMObject>
Overrides:
indexOf in class SVector<T extends CMObject>

find

public T find(java.lang.String arg0)
Description copied from interface: SearchIDList
Searches the sorted list of objects for one with the given ID;

Specified by:
find in interface SearchIDList<T extends CMObject>
Parameters:
arg0 - the ID of the Object to look for
Returns:
the object or null if not found

findStartsWith

public T findStartsWith(java.lang.String arg0)

find

public T find(CMObject arg0)
Description copied from interface: SearchIDList
Searches the sorted list of objects for one with the same ID as the object given.

Specified by:
find in interface SearchIDList<T extends CMObject>
Parameters:
arg0 - the Object like the one to look for
Returns:
the object or null if not found

lastIndexOf

public int lastIndexOf(java.lang.Object arg0)
Specified by:
lastIndexOf in interface java.util.List<T extends CMObject>
Overrides:
lastIndexOf in class SVector<T extends CMObject>

remove

public boolean remove(java.lang.Object arg0)
Specified by:
remove in interface java.util.Collection<T extends CMObject>
Specified by:
remove in interface java.util.List<T extends CMObject>
Overrides:
remove in class SVector<T extends CMObject>

set

public T set(int arg0,
             T arg1)
Specified by:
set in interface java.util.List<T extends CMObject>
Overrides:
set in class SVector<T extends CMObject>

setReadOnly

public void setReadOnly(boolean trueFalse)