org.deduced
Class PropertyCollectionAsValueList<K,V>

java.lang.Object
  extended by org.deduced.PropertyCollectionAsValueList<K,V>
Type Parameters:
K - the type of keys in the value map
V - the type of values in the map
All Implemented Interfaces:
java.lang.Iterable<V>, java.util.Collection<V>, java.util.List<V>

 class PropertyCollectionAsValueList<K,V>
extends java.lang.Object
implements java.util.List<V>

class used to operate a property collection as a list of values

Author:
Steve McDuff

Field Summary
private  PropertyCollection<K,V> collection
          the property collection represented by this list
 
Constructor Summary
PropertyCollectionAsValueList(PropertyCollection<K,V> setCollection)
          constructor
 
Method Summary
 void add(int index, java.lang.Object element)
          (non-Javadoc)
 boolean add(V o)
          (non-Javadoc)
 boolean addAll(java.util.Collection<? extends V> c)
          (non-Javadoc)
 boolean addAll(int index, java.util.Collection<? extends V> c)
          (non-Javadoc)
 void clear()
          (non-Javadoc)
 boolean contains(java.lang.Object o)
          (non-Javadoc)
 boolean containsAll(java.util.Collection<?> c)
          (non-Javadoc)
 V get(int index)
          (non-Javadoc)
private  K getKeyFromIndex(int index)
          utility method to fetch a key from a index
 int indexOf(java.lang.Object o)
          (non-Javadoc)
 boolean isEmpty()
          (non-Javadoc)
 java.util.Iterator<V> iterator()
          (non-Javadoc)
 int lastIndexOf(java.lang.Object o)
          (non-Javadoc)
 java.util.ListIterator<V> listIterator()
          (non-Javadoc)
 java.util.ListIterator<V> listIterator(int index)
          (non-Javadoc)
 V remove(int index)
          (non-Javadoc)
 boolean remove(java.lang.Object o)
          (non-Javadoc)
 boolean removeAll(java.util.Collection<?> c)
          (non-Javadoc)
 boolean retainAll(java.util.Collection<?> c)
          (non-Javadoc)
 V set(int index, V element)
          (non-Javadoc)
 int size()
          (non-Javadoc)
 java.util.List<V> subList(int fromIndex, int toIndex)
          (non-Javadoc)
 java.lang.Object[] toArray()
          (non-Javadoc)
<T> T[]
toArray(T[] a)
          (non-Javadoc)
 
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
 

Field Detail

collection

private PropertyCollection<K,V> collection
the property collection represented by this list

Constructor Detail

PropertyCollectionAsValueList

public PropertyCollectionAsValueList(PropertyCollection<K,V> setCollection)
constructor

Parameters:
setCollection - the property collection represented by this list
Method Detail

size

public int size()
(non-Javadoc)

Specified by:
size in interface java.util.Collection<V>
Specified by:
size in interface java.util.List<V>
See Also:
List.size()

clear

public void clear()
(non-Javadoc)

Specified by:
clear in interface java.util.Collection<V>
Specified by:
clear in interface java.util.List<V>
See Also:
List.clear()

isEmpty

public boolean isEmpty()
(non-Javadoc)

Specified by:
isEmpty in interface java.util.Collection<V>
Specified by:
isEmpty in interface java.util.List<V>
See Also:
List.isEmpty()

toArray

public java.lang.Object[] toArray()
(non-Javadoc)

Specified by:
toArray in interface java.util.Collection<V>
Specified by:
toArray in interface java.util.List<V>
See Also:
List.toArray()

get

public V get(int index)
(non-Javadoc)

Specified by:
get in interface java.util.List<V>
See Also:
List.get(int)

remove

public V remove(int index)
(non-Javadoc)

Specified by:
remove in interface java.util.List<V>
See Also:
List.remove(int)

getKeyFromIndex

private K getKeyFromIndex(int index)
utility method to fetch a key from a index

Parameters:
index - the index to look for the key
Returns:
the key

add

public void add(int index,
                java.lang.Object element)
(non-Javadoc)

Specified by:
add in interface java.util.List<V>
See Also:
List.add(int, java.lang.Object)

indexOf

public int indexOf(java.lang.Object o)
(non-Javadoc)

Specified by:
indexOf in interface java.util.List<V>
See Also:
List.indexOf(java.lang.Object)

lastIndexOf

public int lastIndexOf(java.lang.Object o)
(non-Javadoc)

Specified by:
lastIndexOf in interface java.util.List<V>
See Also:
List.lastIndexOf(java.lang.Object)

add

public boolean add(V o)
(non-Javadoc)

Specified by:
add in interface java.util.Collection<V>
Specified by:
add in interface java.util.List<V>
See Also:
List.add(java.lang.Object)

contains

public boolean contains(java.lang.Object o)
(non-Javadoc)

Specified by:
contains in interface java.util.Collection<V>
Specified by:
contains in interface java.util.List<V>
See Also:
List.contains(java.lang.Object)

remove

public boolean remove(java.lang.Object o)
(non-Javadoc)

Specified by:
remove in interface java.util.Collection<V>
Specified by:
remove in interface java.util.List<V>
See Also:
List.remove(java.lang.Object)

addAll

public boolean addAll(int index,
                      java.util.Collection<? extends V> c)
(non-Javadoc)

Specified by:
addAll in interface java.util.List<V>
See Also:
List.addAll(int, java.util.Collection)

addAll

public boolean addAll(java.util.Collection<? extends V> c)
(non-Javadoc)

Specified by:
addAll in interface java.util.Collection<V>
Specified by:
addAll in interface java.util.List<V>
See Also:
List.addAll(java.util.Collection)

containsAll

public boolean containsAll(java.util.Collection<?> c)
(non-Javadoc)

Specified by:
containsAll in interface java.util.Collection<V>
Specified by:
containsAll in interface java.util.List<V>
See Also:
List.containsAll(java.util.Collection)

removeAll

public boolean removeAll(java.util.Collection<?> c)
(non-Javadoc)

Specified by:
removeAll in interface java.util.Collection<V>
Specified by:
removeAll in interface java.util.List<V>
See Also:
List.removeAll(java.util.Collection)

retainAll

public boolean retainAll(java.util.Collection<?> c)
(non-Javadoc)

Specified by:
retainAll in interface java.util.Collection<V>
Specified by:
retainAll in interface java.util.List<V>
See Also:
List.retainAll(java.util.Collection)

iterator

public java.util.Iterator<V> iterator()
(non-Javadoc)

Specified by:
iterator in interface java.lang.Iterable<V>
Specified by:
iterator in interface java.util.Collection<V>
Specified by:
iterator in interface java.util.List<V>
See Also:
List.iterator()

subList

public java.util.List<V> subList(int fromIndex,
                                 int toIndex)
(non-Javadoc)

Specified by:
subList in interface java.util.List<V>
See Also:
List.subList(int, int)

listIterator

public java.util.ListIterator<V> listIterator()
(non-Javadoc)

Specified by:
listIterator in interface java.util.List<V>
See Also:
List.listIterator()

listIterator

public java.util.ListIterator<V> listIterator(int index)
(non-Javadoc)

Specified by:
listIterator in interface java.util.List<V>
See Also:
List.listIterator(int)

set

public V set(int index,
             V element)
(non-Javadoc)

Specified by:
set in interface java.util.List<V>
See Also:
List.set(int, java.lang.Object)

toArray

public <T> T[] toArray(T[] a)
(non-Javadoc)

Specified by:
toArray in interface java.util.Collection<V>
Specified by:
toArray in interface java.util.List<V>
See Also:
List.toArray(java.lang.Object[])