org.decisiondeck.xmcda_oo.utils
Class MapBackedSet<K,V>

java.lang.Object
  extended by org.decisiondeck.xmcda_oo.utils.MapBackedSet<K,V>
Type Parameters:
K - the key type for the map.
V - the value type for the map, and the type that the set contains.
All Implemented Interfaces:
Iterable<V>, Collection<V>, Set<V>
Direct Known Subclasses:
Criteria

public abstract class MapBackedSet<K,V>
extends Object
implements Set<V>

Note that this is completely different from Apache Commons Collection's MapBackedSet, as this one uses the map values as the set contents (and not the keys). These values are associated to string keys.


Constructor Summary
MapBackedSet()
           
 
Method Summary
 boolean addAll(Collection<? extends V> c)
           
 void clear()
           
 boolean containsAll(Collection<?> c)
           
 boolean equals(Object obj)
           
 int hashCode()
           
 boolean isEmpty()
           
 Iterator<V> iterator()
           
 boolean remove(Object key)
           
 boolean removeAll(Collection<?> c)
           
 boolean retainAll(Collection<?> c)
           
 int size()
           
 Object[] toArray()
           
<T2> T2[]
toArray(T2[] a)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Set
add, contains
 

Constructor Detail

MapBackedSet

public MapBackedSet()
Method Detail

addAll

public boolean addAll(Collection<? extends V> c)
Specified by:
addAll in interface Collection<V>
Specified by:
addAll in interface Set<V>

clear

public void clear()
Specified by:
clear in interface Collection<V>
Specified by:
clear in interface Set<V>

containsAll

public boolean containsAll(Collection<?> c)
Specified by:
containsAll in interface Collection<V>
Specified by:
containsAll in interface Set<V>

equals

public boolean equals(Object obj)
Specified by:
equals in interface Collection<V>
Specified by:
equals in interface Set<V>
Overrides:
equals in class Object

hashCode

public int hashCode()
Specified by:
hashCode in interface Collection<V>
Specified by:
hashCode in interface Set<V>
Overrides:
hashCode in class Object

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Collection<V>
Specified by:
isEmpty in interface Set<V>

iterator

public Iterator<V> iterator()
Specified by:
iterator in interface Iterable<V>
Specified by:
iterator in interface Collection<V>
Specified by:
iterator in interface Set<V>

remove

public boolean remove(Object key)
Specified by:
remove in interface Collection<V>
Specified by:
remove in interface Set<V>

removeAll

public boolean removeAll(Collection<?> c)
Specified by:
removeAll in interface Collection<V>
Specified by:
removeAll in interface Set<V>

retainAll

public boolean retainAll(Collection<?> c)
Specified by:
retainAll in interface Collection<V>
Specified by:
retainAll in interface Set<V>

size

public int size()
Specified by:
size in interface Collection<V>
Specified by:
size in interface Set<V>

toArray

public Object[] toArray()
Specified by:
toArray in interface Collection<V>
Specified by:
toArray in interface Set<V>

toArray

public <T2> T2[] toArray(T2[] a)
Specified by:
toArray in interface Collection<V>
Specified by:
toArray in interface Set<V>

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2011. All Rights Reserved.