public class ExtentMap extends Object implements Map<EClass,Set<EObject>>
OppositeEndFinder#getAllInstancesSeenBy(EClass, org.eclipse.emf.common.notify.Notifier)
to perform
an extent lookup that is consistent with the visibility rules implemented by the OppositeEndFinder
for hidden opposites lookup and traversal.Usage:
in case there is a specificOCL
.setExtentMap
(new ExtentMap(context, oppositeEndFinder))
OppositeEndFinder
to be used. In order to use the DefaultOppositeEndFinder
,
use
OCL
.setExtentMap
(new ExtentMap(context))
Constructor and Description |
---|
ExtentMap(Notifier context)
Uses a
DefaultOppositeEndFinder |
ExtentMap(Notifier context,
OppositeEndFinder oppositeEndFinder) |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
boolean |
containsKey(Object key) |
boolean |
containsValue(Object value) |
Set<Map.Entry<EClass,Set<EObject>>> |
entrySet() |
Set<EObject> |
get(Object cls)
Computes the extent of the specified class
key based on a forward lookup on the
OppositeEndFinder passed to this map during construction. |
boolean |
isEmpty() |
Set<EClass> |
keySet() |
Set<EObject> |
put(EClass key,
Set<EObject> value) |
void |
putAll(Map<? extends EClass,? extends Set<EObject>> m) |
Set<EObject> |
remove(Object key) |
int |
size() |
Collection<Set<EObject>> |
values() |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
public ExtentMap(Notifier context, OppositeEndFinder oppositeEndFinder)
public ExtentMap(Notifier context)
DefaultOppositeEndFinder
context
- the EObject
, Resource
or ResourceSet
relative to which
the visibility rules are evaluated.public Set<EObject> get(Object cls)
key
based on a forward lookup on the
OppositeEndFinder
passed to this map during construction. The collection returned is backed
by the underlying map, meaning that additions to cls
's extent add to the collection
returned, and removals from the extent remove from the collection.public boolean containsKey(Object key)
containsKey
in interface Map<EClass,Set<EObject>>
public boolean containsValue(Object value)
containsValue
in interface Map<EClass,Set<EObject>>
public Collection<Set<EObject>> values()
Copyright © 2005, 2018 IBM Corporation and others. All Rights Reserved.