|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbe.SIRAPRISE.util.IntersectableMap<K,V>
K
- V
- public abstract class IntersectableMap<K,V>
Defines the intersect, minus and union operations on maps
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface java.util.Map |
---|
java.util.Map.Entry<K,V> |
Constructor Summary | |
---|---|
IntersectableMap()
|
Method Summary | |
---|---|
void |
clear()
|
java.lang.Object |
clone()
|
boolean |
containsKey(java.lang.Object key)
|
boolean |
containsValue(java.lang.Object value)
|
java.util.Set<java.util.Map.Entry<K,V>> |
entrySet()
|
boolean |
equals(java.lang.Object obj)
|
V |
get(java.lang.Object key)
|
int |
hashCode()
|
IntersectableMap<K,V> |
intersect(java.util.Set<?> keys)
Returns a Map that holds only the entries whose keys also occur in keys, and whose class is the same as the caller's class. |
java.util.Map<K,V> |
intersect(java.util.Set<?> keys,
java.lang.Class<? extends java.util.Map<K,V>> resultClass)
Returns a Map that holds only the entries whose keys also occur in keys |
boolean |
isEmpty()
|
java.util.Set<K> |
keySet()
|
IntersectableMap<K,V> |
minus(java.util.Set<?> keys)
Returns a Map that holds only the entries whose keys do not occur in set, and whose class is the same as the caller's class. |
java.util.Map<K,V> |
minus(java.util.Set<?> keys,
java.lang.Class<? extends java.util.Map<K,V>> resultClass)
Returns a Map that holds only the entries whose keys do not occur in keys |
V |
put(K key,
V value)
|
void |
putAll(java.util.Map<? extends K,? extends V> t)
|
V |
remove(java.lang.Object key)
|
int |
size()
|
java.lang.String |
toString()
|
IntersectableMap<K,V> |
union(java.util.Map<K,V> otherMap)
Returns a Map that holds only the entries whose keys do not occur in set, and whose class is the same as the caller's class. |
java.util.Map<K,V> |
union(java.util.Map<K,V> otherMap,
java.lang.Class<java.util.Map<K,V>> resultClass)
Returns a Map that holds the entries that occur in either this or the other map. |
java.util.Collection<V> |
values()
|
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public IntersectableMap()
Method Detail |
---|
public final void clear()
clear
in interface java.util.Map<K,V>
public final java.lang.Object clone()
clone
in class java.lang.Object
public final boolean containsKey(java.lang.Object key)
containsKey
in interface java.util.Map<K,V>
public final boolean containsValue(java.lang.Object value)
containsValue
in interface java.util.Map<K,V>
public final java.util.Set<java.util.Map.Entry<K,V>> entrySet()
entrySet
in interface java.util.Map<K,V>
public final boolean equals(java.lang.Object obj)
equals
in interface java.util.Map<K,V>
equals
in class java.lang.Object
public final V get(java.lang.Object key)
get
in interface java.util.Map<K,V>
public final int hashCode()
hashCode
in interface java.util.Map<K,V>
hashCode
in class java.lang.Object
public final IntersectableMap<K,V> intersect(java.util.Set<?> keys)
keys
- The set that is to be intersected with the keys of this map
public final java.util.Map<K,V> intersect(java.util.Set<?> keys, java.lang.Class<? extends java.util.Map<K,V>> resultClass) throws java.lang.InstantiationException, java.lang.IllegalAccessException
keys
- The set that is to be intersected with the keys of this mapresultClass
- the Class that the result object must be
java.lang.IllegalAccessException
java.lang.InstantiationException
public final boolean isEmpty()
isEmpty
in interface java.util.Map<K,V>
public final java.util.Set<K> keySet()
keySet
in interface java.util.Map<K,V>
public final IntersectableMap<K,V> minus(java.util.Set<?> keys)
keys
- The set that is to be intersected with the keys of this map
public final java.util.Map<K,V> minus(java.util.Set<?> keys, java.lang.Class<? extends java.util.Map<K,V>> resultClass) throws java.lang.InstantiationException, java.lang.IllegalAccessException
keys
- The set that is to be differentiated with the keys of this mapresultClass
- the Class that the result object must be
java.lang.IllegalAccessException
java.lang.InstantiationException
public final V put(K key, V value)
put
in interface java.util.Map<K,V>
public final void putAll(java.util.Map<? extends K,? extends V> t)
putAll
in interface java.util.Map<K,V>
public final V remove(java.lang.Object key)
remove
in interface java.util.Map<K,V>
public final int size()
size
in interface java.util.Map<K,V>
public java.lang.String toString()
toString
in class java.lang.Object
public final IntersectableMap<K,V> union(java.util.Map<K,V> otherMap) throws EqualKeyUnequalValuesException
otherMap
- the map to be unioned with this one
EqualKeyUnequalValuesException
public final java.util.Map<K,V> union(java.util.Map<K,V> otherMap, java.lang.Class<java.util.Map<K,V>> resultClass) throws EqualKeyUnequalValuesException, java.lang.InstantiationException, java.lang.IllegalAccessException
otherMap
- the map to be unioned with this oneresultClass
- the Class that the result object must be
EqualKeyUnequalValuesException
java.lang.IllegalAccessException
java.lang.InstantiationException
public final java.util.Collection<V> values()
values
in interface java.util.Map<K,V>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |