A Map provides a Set of key values, each of which has an associated value. Keys and values may be null, but neither may be invalid.
conformsTo
OclAny
Associations
keyType : K[?]
The key type of the key-value pairs of
self.
valueType : V[?]
The value type of the key-value pairs of
self.
Operations
=(object2 : OclSelf[?]) : Boolean[1]
precedence:
EQUALITY
Evaluates to
true if
self and s contain the same elements.
<>(object2 : OclSelf[?]) : Boolean[1]
precedence:
EQUALITY
at(key : OclAny[?]) : V[?] invalidating
The value of the map at
key.
excludes(key : OclAny[?]) : Boolean[1]
True if
key is not one of the keys of
self,
false otherwise.
excludes(key : OclAny[?], value : OclAny[?]) : Boolean[1]
True if
key and
value are not a key-value pair of
self,
false otherwise.
excludesAll(K2)(coll : Collection(K2)) : Boolean[1]
True if none of the elements of
coll are keys of
self,
false otherwise.
excludesMap(K2, V2)(map : Map(K2, V2)[?]) : Boolean[1]
True if none of the key-value pairs of
map are also key-value pairs of
self,
false otherwise.
excludesValue(value : OclAny[?]) : Boolean[1]
True if
value is not one of the values of
self,
false otherwise.
excluding(key : OclAny[?]) : Map(K, V)[?]
The map containing all key-value pairs of
self except any whose key is
key.
excluding(key : OclAny[?], value : OclAny[?]) : Map(K, V)[?]
The map containing all key-value pairs of
self except any whose key is
key and whose value is
key.
excludingAll(keys : Collection(OclAny)) : Map(K, V)[?]
The map containing all key-value pairs of
self except any whose key is included in
keys.
excludingMap(K2, V2)(map : Map(K2, V2)[?]) : Map(K, V)[?]
The map containing all key-value pairs of
self except any which is also included in
map.
includes(key : OclAny[?]) : Boolean[1]
True if
key is one of the keys of
self,
false otherwise.
includes(key : OclAny[?], value : OclAny[?]) : Boolean[1]
True if
key and
value are a key-value pair of
self,
false otherwise.
includesAll(K2)(coll : Collection(K2)) : Boolean[1]
True if all the elements of
coll are keys of
self,
false otherwise.
includesMap(K2, V2)(map : Map(K2, V2)[?]) : Boolean[1]
True if all of the key-value pairs of
map are also key-value pairs of
self,
false otherwise.
includesValue(value : OclAny[?]) : Boolean[1]
True if
value is one of the values of
self,
false otherwise.
including(key : K[?], value : V[?]) : Map(K, V)[?]
The map containing all of the key-value pairs of
self and an additional key-value pair for
key and
value.
If
key is already a key of
self, the old value pair is replaced by
value.
includingMap(K2, V2)(map : Map(K2, V2)[?]) : Map(K, V)[?]
The map containing all of the key-value pairs of
self and
map.
The values associated with key-value pairs in
map replace those in
self where the same key is used by both maps.
isEmpty() : Boolean[1]
True if
self is the empty map,
false otherwise.
keys() : Set(K)
A Set comprising all the keys of the key-value pairs in
self.
notEmpty() : Boolean[1]
True if
self not the empty map,
false otherwise.
size() : Integer[1]
The number of key-value pairs in
self.
values() : Bag(V)
The Bag comprising all the values of the key-value pairs in
self.