org.homeunix.thecave.moss.data.list
Class ListSet<T>

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<T>
          extended by org.homeunix.thecave.moss.data.list.ListSet<T>
All Implemented Interfaces:
java.lang.Iterable<T>, java.util.Collection<T>, java.util.List<T>

public class ListSet<T>
extends java.util.AbstractList<T>

A list which is automatically generated, with a Set backing it. Can be used to convert a Set to a List, but allow easy updating of the list when the backing Set changes. Call updateList() to update.

Author:
wyatt

Field Summary
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
ListSet(java.util.Set<T> backingSet)
           
 
Method Summary
 T get(int index)
           
 int size()
           
 void updateList()
           
 
Methods inherited from class java.util.AbstractList
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subList
 
Methods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray
 

Constructor Detail

ListSet

public ListSet(java.util.Set<T> backingSet)
Method Detail

get

public T get(int index)
Specified by:
get in interface java.util.List<T>
Specified by:
get in class java.util.AbstractList<T>

size

public int size()
Specified by:
size in interface java.util.Collection<T>
Specified by:
size in interface java.util.List<T>
Specified by:
size in class java.util.AbstractCollection<T>

updateList

public void updateList()