Interface MapKernel<K,V>
- Type Parameters:
K- type ofMapKerneldomain (key) entriesV- type ofMapKernelrange (associated value) entries
- All Known Subinterfaces:
Map<K,V>
- All Known Implementing Classes:
Map1L, Map2, Map3, Map4, MapSecondary
Map kernel component with primary methods. (Note: by package-wide convention,
all references are non-null.)
- Mathematical Subtypes:
PARTIAL_FUNCTION is finite set of (key: K, value: V) exemplar m constraint for all key1, key2: K, value1, value2: V where ((key1, value1) is in m and (key2, value2) is in m) (if key1 = key2 then value1 = value2)- Mathematical Definitions:
DOMAIN( m: PARTIAL_FUNCTION ): finite set of K satisfies for all key: K (key is in DOMAIN(m) iff there exists value: V ((key, value) is in m))- Mathematical Model (abstract value and abstract invariant of this):
type MapKernel is modeled by PARTIAL_FUNCTION- Constructor(s) (initial abstract value(s) of this):
(): ensures this = {}- Iterator String (abstract value of ~this):
entries(~this.seen * ~this.unseen) = this and |~this.seen * ~this.unseen| = |this|
-
Method Summary
Modifier and TypeMethodDescriptionvoidAdds the pair (key,value) to this.booleanReports whether there is a pair inthiswhose first component iskey.Removes the pair whose first component iskeyand returns it.Removes and returns an arbitrary pair fromthis.intsize()Reports size ofthis.Reports the value associated withkeyinthis.Methods inherited from interface Iterable
forEach, iterator, spliteratorMethods inherited from interface Standard
clear, newInstance, transferFrom
-
Method Details
-
add
-
remove
-
removeAny
-
value
-
hasKey
-
size
-