org.deduced
Class PropertyCollectionAsPropertyList<K,V>

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

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

Class used to browse a property collection as a list of property objects.

Author:
Steve McDuff

Field Summary
private  PropertyCollection<K,V> collection
          the collection to browse
 
Constructor Summary
PropertyCollectionAsPropertyList(PropertyCollection<K,V> setCollection)
          constructor
 
Method Summary
 void add(int index, Property<V> element)
          (non-Javadoc)
 boolean add(Property<V> o)
          (non-Javadoc)
 boolean addAll(java.util.Collection<? extends Property<V>> c)
          (non-Javadoc)
 boolean addAll(int index, java.util.Collection<? extends Property<V>> c)
          (non-Javadoc)
 void clear()
          (non-Javadoc)
 boolean contains(java.lang.Object o)
          (non-Javadoc)
 boolean containsAll(java.util.Collection<?> c)
          (non-Javadoc)
 Property<V> get(int index)
          (non-Javadoc)
private  K getKeyFromIndex(int index)
          Utility method to get a key from a specified index in a property collection
 int indexOf(java.lang.Object o)
          (non-Javadoc)
 boolean isEmpty()
          (non-Javadoc)
 java.util.Iterator<Property<V>> iterator()
          (non-Javadoc)
 int lastIndexOf(java.lang.Object o)
          (non-Javadoc)
 java.util.ListIterator<Property<V>> listIterator()
          (non-Javadoc)
 java.util.ListIterator<Property<V>> listIterator(int index)
          (non-Javadoc)
 Property<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)
 Property<V> set(int index, Property<V> element)
          (non-Javadoc)
 int size()
          (non-Javadoc)
 java.util.List<Property<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 collection to browse

Constructor Detail

PropertyCollectionAsPropertyList

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

Parameters:
setCollection - the collection to browse
Method Detail

size

public int size()
(non-Javadoc)

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

clear

public void clear()
(non-Javadoc)

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

isEmpty

public boolean isEmpty()
(non-Javadoc)

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

toArray

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

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

get

public Property<V> get(int index)
(non-Javadoc)

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

getKeyFromIndex

private K getKeyFromIndex(int index)
Utility method to get a key from a specified index in a property collection

Parameters:
index - the index to fetch
Returns:
the key

remove

public Property<V> remove(int index)
(non-Javadoc)

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

add

public void add(int index,
                Property<V> element)
(non-Javadoc)

Specified by:
add in interface java.util.List<Property<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<Property<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<Property<V>>
See Also:
List.lastIndexOf(java.lang.Object)

add

public boolean add(Property<V> o)
(non-Javadoc)

Specified by:
add in interface java.util.Collection<Property<V>>
Specified by:
add in interface java.util.List<Property<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<Property<V>>
Specified by:
contains in interface java.util.List<Property<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<Property<V>>
Specified by:
remove in interface java.util.List<Property<V>>
See Also:
List.remove(java.lang.Object)

addAll

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

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

addAll

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

Specified by:
addAll in interface java.util.Collection<Property<V>>
Specified by:
addAll in interface java.util.List<Property<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<Property<V>>
Specified by:
containsAll in interface java.util.List<Property<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<Property<V>>
Specified by:
removeAll in interface java.util.List<Property<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<Property<V>>
Specified by:
retainAll in interface java.util.List<Property<V>>
See Also:
List.retainAll(java.util.Collection)

iterator

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

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

subList

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

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

listIterator

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

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

listIterator

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

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

set

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

Specified by:
set in interface java.util.List<Property<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<Property<V>>
Specified by:
toArray in interface java.util.List<Property<V>>
See Also:
List.toArray(java.lang.Object[])