com.planet_ink.coffee_mud.core.collections
Class ChameleonList<K>

java.lang.Object
  extended by com.planet_ink.coffee_mud.core.collections.ChameleonList<K>
All Implemented Interfaces:
SizedIterable<K>, java.lang.Iterable<K>, java.util.Collection<K>, java.util.List<K>

public class ChameleonList<K>
extends java.lang.Object
implements java.util.List<K>, SizedIterable<K>


Nested Class Summary
static class ChameleonList.Signaler<K>
           
 
Constructor Summary
ChameleonList(java.util.List<K> l, ChameleonList.Signaler<K> signaler)
           
 
Method Summary
 void add(int arg0, K arg1)
           
 boolean add(K arg0)
           
 boolean addAll(java.util.Collection<? extends K> arg0)
           
 boolean addAll(int arg0, java.util.Collection<? extends K> arg1)
           
 void changeMeInto(ChameleonList<K> fromList)
           
 void clear()
           
 boolean contains(java.lang.Object arg0)
           
 boolean containsAll(java.util.Collection<?> arg0)
           
 K get(int arg0)
           
 ChameleonList.Signaler<K> getSignaler()
           
 int indexOf(java.lang.Object arg0)
           
 boolean isEmpty()
           
 java.util.Iterator<K> iterator()
           
 int lastIndexOf(java.lang.Object arg0)
           
 java.util.ListIterator<K> listIterator()
           
 java.util.ListIterator<K> listIterator(int arg0)
           
 K remove(int arg0)
           
 boolean remove(java.lang.Object arg0)
           
 boolean removeAll(java.util.Collection<?> arg0)
           
 boolean retainAll(java.util.Collection<?> arg0)
           
 K set(int arg0, K arg1)
           
 int size()
          Returns the size of the iterable
 java.util.List<K> subList(int arg0, int arg1)
           
 java.lang.Object[] toArray()
           
<T> T[]
toArray(T[] arg0)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.List
equals, hashCode
 

Constructor Detail

ChameleonList

public ChameleonList(java.util.List<K> l,
                     ChameleonList.Signaler<K> signaler)
Method Detail

changeMeInto

public void changeMeInto(ChameleonList<K> fromList)

getSignaler

public ChameleonList.Signaler<K> getSignaler()

add

public boolean add(K arg0)
Specified by:
add in interface java.util.Collection<K>
Specified by:
add in interface java.util.List<K>

add

public void add(int arg0,
                K arg1)
Specified by:
add in interface java.util.List<K>

addAll

public boolean addAll(java.util.Collection<? extends K> arg0)
Specified by:
addAll in interface java.util.Collection<K>
Specified by:
addAll in interface java.util.List<K>

addAll

public boolean addAll(int arg0,
                      java.util.Collection<? extends K> arg1)
Specified by:
addAll in interface java.util.List<K>

clear

public void clear()
Specified by:
clear in interface java.util.Collection<K>
Specified by:
clear in interface java.util.List<K>

contains

public boolean contains(java.lang.Object arg0)
Specified by:
contains in interface java.util.Collection<K>
Specified by:
contains in interface java.util.List<K>

containsAll

public boolean containsAll(java.util.Collection<?> arg0)
Specified by:
containsAll in interface java.util.Collection<K>
Specified by:
containsAll in interface java.util.List<K>

get

public K get(int arg0)
Specified by:
get in interface java.util.List<K>

indexOf

public int indexOf(java.lang.Object arg0)
Specified by:
indexOf in interface java.util.List<K>

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface java.util.Collection<K>
Specified by:
isEmpty in interface java.util.List<K>

iterator

public java.util.Iterator<K> iterator()
Specified by:
iterator in interface java.lang.Iterable<K>
Specified by:
iterator in interface java.util.Collection<K>
Specified by:
iterator in interface java.util.List<K>

lastIndexOf

public int lastIndexOf(java.lang.Object arg0)
Specified by:
lastIndexOf in interface java.util.List<K>

listIterator

public java.util.ListIterator<K> listIterator()
Specified by:
listIterator in interface java.util.List<K>

listIterator

public java.util.ListIterator<K> listIterator(int arg0)
Specified by:
listIterator in interface java.util.List<K>

remove

public boolean remove(java.lang.Object arg0)
Specified by:
remove in interface java.util.Collection<K>
Specified by:
remove in interface java.util.List<K>

remove

public K remove(int arg0)
Specified by:
remove in interface java.util.List<K>

removeAll

public boolean removeAll(java.util.Collection<?> arg0)
Specified by:
removeAll in interface java.util.Collection<K>
Specified by:
removeAll in interface java.util.List<K>

retainAll

public boolean retainAll(java.util.Collection<?> arg0)
Specified by:
retainAll in interface java.util.Collection<K>
Specified by:
retainAll in interface java.util.List<K>

set

public K set(int arg0,
             K arg1)
Specified by:
set in interface java.util.List<K>

size

public int size()
Description copied from interface: SizedIterable
Returns the size of the iterable

Specified by:
size in interface SizedIterable<K>
Specified by:
size in interface java.util.Collection<K>
Specified by:
size in interface java.util.List<K>
Returns:
the size

subList

public java.util.List<K> subList(int arg0,
                                 int arg1)
Specified by:
subList in interface java.util.List<K>

toArray

public java.lang.Object[] toArray()
Specified by:
toArray in interface java.util.Collection<K>
Specified by:
toArray in interface java.util.List<K>

toArray

public <T> T[] toArray(T[] arg0)
Specified by:
toArray in interface java.util.Collection<K>
Specified by:
toArray in interface java.util.List<K>