|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
This class provides similar functionality to java.util.Map, however,
it is properly descended from a Set (org.zedlib.Set, hence
implements the java.util.Set interface). It does
not implement the java.util.Map interface because of conflicts between the
java.util.Map and java.util.Set interfaces.
If X and Y are sets, X → Y is the set of partial functions from X to Y.
These are relations which relate each member x of X to at most one member
of Y.
| Method Summary | |
boolean |
containsKey(Object key)
An alternative for domain().contains(key). |
boolean |
containsValue(Object value)
An alternative for range().contains(value). |
Maplet |
getMaplet(Object key)
Returns the maplet that a given key participates in. |
Object |
put(Maplet m)
Adds a maplet to this function. |
| Methods inherited from interface org.zedlib.Relation |
add, add, addAll, composition, domain, domainAntiRestriction, domainRestriction, image, inverse, isFunction, isInjection, isReflexive, override, range, rangeAntiRestriction, rangeRestriction, transitiveClosure |
| Methods inherited from interface org.zedlib.Set |
cartesianProduct, difference, identity, intersection, isSubsetOf, isSupersetOf, union |
| Methods inherited from interface java.util.Set |
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray |
| Method Detail |
public Object put(Maplet m)
m - the maplet to add to the function
null if
there was no maplet having a key of x in the function.public Maplet getMaplet(Object key)
key - the key (x) with which to obtain its corresponding (y) value
null
if no maplet exists with the given key.public boolean containsValue(Object value)
range().contains(value).
value - the object to check for existence in the range of this function
true if a given value, y, is contained in the range of this
functionpublic boolean containsKey(Object key)
domain().contains(key).
key - the object to check for existence in the domain of this function
true if a given value, x, is contained in the domain of
this function
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||