public class EqualityHelper extends AdapterImpl implements IEqualityHelper
Adapter.Internal
target
Constructor and Description |
---|
EqualityHelper()
Deprecated.
use the EqualityHelper(Cache) constructor instead.
|
EqualityHelper(com.google.common.cache.LoadingCache<EObject,URI> uriCache)
Creates a new EqualityHelper with the given cache.
|
Modifier and Type | Method and Description |
---|---|
static com.google.common.cache.LoadingCache<EObject,URI> |
createDefaultCache(com.google.common.cache.CacheBuilder<Object,Object> cacheBuilder)
Create a cache as required by EqualityHelper.
|
com.google.common.cache.Cache<EObject,URI> |
getCache()
Deprecated.
|
protected Match |
getMatch(EObject o)
Retrieves the match of the given EObject.
|
Comparison |
getTarget() |
URI |
getURI(EObject object)
Deprecated.
|
boolean |
isAdapterForType(Object type) |
boolean |
matchingAttributeValues(Object object1,
Object object2)
This should only be used if the two given Objects are known not to be instances of EObjects.
|
protected boolean |
matchingEObjects(EObject object1,
EObject object2)
Compares two values as EObjects, using their Match if it can be found, comparing through their URIs
otherwise.
|
protected boolean |
matchingURIs(EObject object1,
EObject object2)
Compare the URIs (of similar concept) of EObjects.
|
boolean |
matchingValues(Comparison comparison,
Object object1,
Object object2)
Deprecated.
|
boolean |
matchingValues(Object object1,
Object object2)
Check that the two given values are "equal", considering the specifics of EMF.
|
notifyChanged, setTarget, unsetTarget
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
notifyChanged, setTarget
@Deprecated public EqualityHelper()
public EqualityHelper(com.google.common.cache.LoadingCache<EObject,URI> uriCache)
uriCache
- the cache to be used for EcoreUtil.getURI(EObject)
calls.public Comparison getTarget()
getTarget
in interface Adapter
getTarget
in interface IEqualityHelper
getTarget
in class AdapterImpl
AdapterImpl.getTarget()
public boolean isAdapterForType(Object type)
isAdapterForType
in interface Adapter
isAdapterForType
in class AdapterImpl
AdapterImpl.isAdapterForType(java.lang.Object)
@Deprecated public boolean matchingValues(Comparison comparison, Object object1, Object object2)
comparison
- Provides us with the Match necessary for EObject comparison.object1
- First of the two objects to compare here.object2
- Second of the two objects to compare here.true
if both objects are to be considered equal, false
otherwise.matchingValues(Object, Object)
public boolean matchingValues(Object object1, Object object2)
matchingValues
in interface IEqualityHelper
object1
- First of the two objects to compare here.object2
- Second of the two objects to compare here.true
if both objects are to be considered equal, false
otherwise.IEqualityHelper.matchingValues(java.lang.Object, java.lang.Object)
protected boolean matchingEObjects(EObject object1, EObject object2)
object1
- First of the two objects to compare here.object2
- Second of the two objects to compare here.true
if these two EObjects are to be considered equal, false
otherwise.protected Match getMatch(EObject o)
matchingEObjects(EObject, EObject)
over and over with the same first
object.o
- The object for which we need the associated Match.null
otherwise.protected boolean matchingURIs(EObject object1, EObject object2)
object1
- First of the two objects to compare here.object2
- Second of the two objects to compare here.true
if these two EObjects have the same URIs, false
otherwise.public boolean matchingAttributeValues(Object object1, Object object2)
Object.equals(Object)
implementation.matchingAttributeValues
in interface IEqualityHelper
object1
- First of the two objects to compare here.object2
- Second of the two objects to compare here.true
if both objects are to be considered equal, false
otherwise.IEqualityHelper.matchingAttributeValues(java.lang.Object,
java.lang.Object)
@Deprecated public URI getURI(EObject object)
object
- any EObject.null
if we somehow could not compute it.@Deprecated public com.google.common.cache.Cache<EObject,URI> getCache()
public static com.google.common.cache.LoadingCache<EObject,URI> createDefaultCache(com.google.common.cache.CacheBuilder<Object,Object> cacheBuilder)
cacheBuilder
- The builder to use to instantiate the cache.
Copyright (c) 2006, 2015 Obeo and others. All rights reserved.