public abstract class LazyExtentMap<CLS,E> extends Object implements Map<CLS,Set<E>>
Note that this implementation violates the contract of the
Map API as follows:
Map.entrySet() method does not return entries
for any keys that have not already been queried via the
Map.get(java.lang.Object) methodMap.keySet()
and Map.values() methods also are not completeIn practice, this does not matter because this map is only used for providing class extents to the OCL engine, and it only does look-up by key. Moreover, this isn't strictly a violation of any contract because there is no way to distinguish this behaviour from concurrent updates.
See the Environment class for a description of the
generic type parameters of this class.
| Constructor and Description |
|---|
LazyExtentMap(EObject context)
Initializes me with the context element of an OCL
expression evaluation.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
boolean |
containsKey(Object key) |
boolean |
containsValue(Object value) |
Set<Map.Entry<CLS,Set<E>>> |
entrySet() |
boolean |
equals(Object obj) |
Set<E> |
get(Object key)
Lazily computes the extent of the specified class
key. |
int |
hashCode() |
boolean |
isEmpty() |
Set<CLS> |
keySet() |
Set<E> |
put(CLS key,
Set<E> value) |
void |
putAll(Map<? extends CLS,? extends Set<E>> t) |
Set<E> |
remove(Object key) |
int |
size() |
String |
toString() |
Collection<Set<E>> |
values() |
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAllpublic LazyExtentMap(EObject context)
context - my context elementpublic boolean containsKey(Object key)
containsKey in interface Map<CLS,Set<E>>public boolean containsValue(Object value)
containsValue in interface Map<CLS,Set<E>>public boolean equals(Object obj)
public int hashCode()
Copyright © 2005, 2018 IBM Corporation and others. All Rights Reserved.