|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--org.favabeans.util.DagInheritanceMap
A DagInheritanceMap is an implementation of interface
InheritanceMap backed by a DagPoset and a HashMap.
| Inner classes inherited from class java.util.Map |
Map.Entry |
| Constructor Summary | |
DagInheritanceMap()
Construct a new, empty DagInheritanceMap. |
|
DagInheritanceMap(PoComparator comparator)
Construct a new, empty DagInheritanceMap. |
|
| Method Summary | |
void |
clear()
|
PoComparator |
comparator()
|
boolean |
containsKey(Object key)
Determine if this InheritanceMap maps a given key,
or one of its super-keys, to a value. |
boolean |
containsKey(Object key,
boolean inherit)
Determine if this InheritanceMap maps a given key
to a value. |
boolean |
containsValue(Object value)
|
Set |
entrySet()
|
boolean |
equals(Object x)
|
Object |
get(Object key)
Return the associated value for the given key or a super-key of that key. |
Object |
get(Object key,
boolean inherit)
Return the associated value for the given key. |
int |
hashCode()
|
boolean |
isEmpty()
|
Poset |
keyPoset()
Return a Poset view of the keys of this
InheritanceMap. |
Set |
keySet()
|
Object |
put(Object key,
Object value)
Create a direct association from a key to a value. |
void |
putAll(Map map)
Invoke put(Object, Object) for each (key,
value) entry in a supplied Map. |
Object |
remove(Object key)
Remove the direct association between a key and a value. |
int |
size()
|
Collection |
values()
|
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DagInheritanceMap()
DagInheritanceMap.public DagInheritanceMap(PoComparator comparator)
DagInheritanceMap.comparator - the object used to impose the partial
ordering on the keys of this DagInheritanceMap.| Method Detail |
public int size()
size in interface Mappublic boolean isEmpty()
isEmpty in interface Mappublic boolean containsKey(Object key)
InheritanceMapInheritanceMap maps a given key,
or one of its super-keys, to a value.containsKey in interface InheritanceMaporg.favabeans.util.InheritanceMapkey - a key which may be in this
InheritanceMap.true if the supplied key, or
one of its super-keys, is mapped to a value.
public boolean containsKey(Object key,
boolean inherit)
InheritanceMapInheritanceMap maps a given key
to a value.containsKey in interface InheritanceMaporg.favabeans.util.InheritanceMapkey - a key which may be in this
InheritanceMap.inherit - set to true if super-keys are to be
included in the search; false if only directly
mapped keys are to be searched.true if the supplied key or,
if applicable, one of its super-keys, is mapped to a value.public boolean containsValue(Object value)
containsValue in interface Mappublic Object get(Object key)
InheritanceMapget in interface InheritanceMaporg.favabeans.util.InheritanceMapkey - the key for which a value is required.null if none
could be found.
public Object get(Object key,
boolean inherit)
InheritanceMapget in interface InheritanceMaporg.favabeans.util.InheritanceMapkey - the key for which a value is required.inherit - set to true if super-keys are to be
included in the search; false if only directly
mapped keys are to be searched.null if none
could be found.
public Object put(Object key,
Object value)
InheritanceMapput in interface InheritanceMaporg.favabeans.util.InheritanceMapkey - the key with which to associate the value.value - the value to associate with the supplied key.null if none existed.public Object remove(Object key)
InheritanceMapremove in interface InheritanceMaporg.favabeans.util.InheritanceMapkey - the key for which to remove the associated value.key,
or null if no value was previously associated.public void putAll(Map map)
InheritanceMapInheritanceMap.put(Object, Object) for each (key,
value) entry in a supplied Map.putAll in interface InheritanceMaporg.favabeans.util.InheritanceMapmap - the Map from which to obtain the
(key, value) entries.public void clear()
clear in interface Mappublic Set keySet()
keySet in interface Mappublic Poset keyPoset()
InheritanceMapPoset view of the keys of this
InheritanceMap.keyPoset in interface InheritanceMaporg.favabeans.util.InheritanceMapPoset.public Collection values()
values in interface Mappublic Set entrySet()
entrySet in interface Mappublic PoComparator comparator()
comparator in interface InheritanceMaporg.favabeans.util.InheritanceMapPoComparator used to implement the partial
ordering on the keys of this InheritanceMap, or
null if this InheritanceMap expects
its elements to be instances of PoComparable.public boolean equals(Object x)
equals in interface Mapequals in class Objectpublic int hashCode()
hashCode in interface MaphashCode in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||