org.deri.iris.utils.equivalence
Class IgnoreTermEquivalence

java.lang.Object
  extended by org.deri.iris.utils.equivalence.IgnoreTermEquivalence
All Implemented Interfaces:
IEquivalentTerms

public class IgnoreTermEquivalence
extends Object
implements IEquivalentTerms

An ineffective term equivalence implementation, i.e. this term equivalence relation does not keep track of equivalent terms, but only provides the basic required functionality. In particular:

Author:
Adrian Marte

Constructor Summary
IgnoreTermEquivalence()
           
 
Method Summary
 boolean areEquivalent(ITerm x, ITerm y)
          Checks if the specified terms are equivalent.
 ITerm findRepresentative(ITerm term)
          Returns a representative term for the specified terms.
 Set<ITerm> getEquivalent(ITerm term)
          Returns the set of terms which are equivalent to the specified term.
 void setEquivalent(ITerm x, ITerm y)
          Defines the specified terms as equivalent.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IgnoreTermEquivalence

public IgnoreTermEquivalence()
Method Detail

areEquivalent

public boolean areEquivalent(ITerm x,
                             ITerm y)
Description copied from interface: IEquivalentTerms
Checks if the specified terms are equivalent.

Specified by:
areEquivalent in interface IEquivalentTerms
Parameters:
x - The first term.
y - The second term.
Returns:
true if the two given terms are equivalent, false otherwise.

findRepresentative

public ITerm findRepresentative(ITerm term)
Description copied from interface: IEquivalentTerms
Returns a representative term for the specified terms. If two terms are equivalent, they have the same representative term.

Specified by:
findRepresentative in interface IEquivalentTerms
Parameters:
term - The term.
Returns:
The representative term for the specified term.

getEquivalent

public Set<ITerm> getEquivalent(ITerm term)
Description copied from interface: IEquivalentTerms
Returns the set of terms which are equivalent to the specified term. The set also contains the term itself.

Specified by:
getEquivalent in interface IEquivalentTerms
Parameters:
term - The term.
Returns:
The set of terms which are equivalent to the specified term. The set also contains the term itself.

setEquivalent

public void setEquivalent(ITerm x,
                          ITerm y)
Description copied from interface: IEquivalentTerms
Defines the specified terms as equivalent.

Specified by:
setEquivalent in interface IEquivalentTerms
Parameters:
x - The first term.
y - The second term.