org.deduced
Class PropertyCollectionAsKeySet<K,V>

java.lang.Object
  extended by org.deduced.PropertyCollectionAsKeySet<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<K>, java.util.Collection<K>, java.util.Set<K>

 class PropertyCollectionAsKeySet<K,V>
extends java.lang.Object
implements java.util.Set<K>

Class that represents a property collection as a set of keys

Author:
Steve McDuff

Field Summary
private  PropertyCollection<K,V> collection
          the collection to browse
private  java.util.Collection<K> keyCollection
          the collection of keys to browse
 
Constructor Summary
PropertyCollectionAsKeySet(PropertyCollection<K,V> setCollection, java.util.Collection<K> setKeyCollection)
          constructor
 
Method Summary
 boolean add(java.lang.Object o)
          (non-Javadoc)
 boolean addAll(java.util.Collection<? extends K> c)
          (non-Javadoc)
 void clear()
          (non-Javadoc)
 boolean contains(java.lang.Object o)
          (non-Javadoc)
 boolean containsAll(java.util.Collection<?> c)
          (non-Javadoc)
 boolean isEmpty()
          (non-Javadoc)
 java.util.Iterator<K> iterator()
          (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)
 int size()
          (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.Set
equals, hashCode
 

Field Detail

collection

private final PropertyCollection<K,V> collection
the collection to browse


keyCollection

private final java.util.Collection<K> keyCollection
the collection of keys to browse

Constructor Detail

PropertyCollectionAsKeySet

public PropertyCollectionAsKeySet(PropertyCollection<K,V> setCollection,
                                  java.util.Collection<K> setKeyCollection)
constructor

Parameters:
setCollection - the collection to browse
setKeyCollection - the actual collection of keys
Method Detail

size

public int size()
(non-Javadoc)

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

clear

public void clear()
(non-Javadoc)

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

isEmpty

public boolean isEmpty()
(non-Javadoc)

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

toArray

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

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

add

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

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

contains

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

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

remove

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

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

addAll

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

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

containsAll

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

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

removeAll

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

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

retainAll

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

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

iterator

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

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.Set<K>
See Also:
Set.iterator()

toArray

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

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