|
|||||||||
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 Map
public boolean isEmpty()
isEmpty
in interface Map
public boolean containsKey(Object key)
InheritanceMap
InheritanceMap
maps a given key,
or one of its super-keys, to a value.containsKey
in interface InheritanceMap
org.favabeans.util.InheritanceMap
key
- 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)
InheritanceMap
InheritanceMap
maps a given key
to a value.containsKey
in interface InheritanceMap
org.favabeans.util.InheritanceMap
key
- 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 Map
public Object get(Object key)
InheritanceMap
get
in interface InheritanceMap
org.favabeans.util.InheritanceMap
key
- the key for which a value is required.null
if none
could be found.public Object get(Object key, boolean inherit)
InheritanceMap
get
in interface InheritanceMap
org.favabeans.util.InheritanceMap
key
- 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)
InheritanceMap
put
in interface InheritanceMap
org.favabeans.util.InheritanceMap
key
- 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)
InheritanceMap
remove
in interface InheritanceMap
org.favabeans.util.InheritanceMap
key
- the key for which to remove the associated value.key
,
or null
if no value was previously associated.public void putAll(Map map)
InheritanceMap
InheritanceMap.put(Object, Object)
for each (key
,
value
) entry in a supplied Map
.putAll
in interface InheritanceMap
org.favabeans.util.InheritanceMap
map
- the Map
from which to obtain the
(key
, value
) entries.public void clear()
clear
in interface Map
public Set keySet()
keySet
in interface Map
public Poset keyPoset()
InheritanceMap
Poset
view of the keys of this
InheritanceMap
.keyPoset
in interface InheritanceMap
org.favabeans.util.InheritanceMap
Poset
.public Collection values()
values
in interface Map
public Set entrySet()
entrySet
in interface Map
public PoComparator comparator()
comparator
in interface InheritanceMap
org.favabeans.util.InheritanceMap
PoComparator
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 Map
equals
in class Object
public int hashCode()
hashCode
in interface Map
hashCode
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |