|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.semwebcentral.sweetrules.ruleml.SweetEqualityChecker
Created on Oct 30, 2004
A utility class to check if two elements
in the RuleML object representation are equal
in terms of their content.
Note:
1) If List type arguments are being compared
then their orders should be the same
2) The top level element currently supported is a fact
3) Due to translation issues from RuleML -> Jess we are
not comparing the rulelabels on Facts
Field Summary | |
private static SweetEqualityChecker |
sweetEqualityChecker
The singleton instance |
Constructor Summary | |
private |
SweetEqualityChecker()
The private constructor for this Singleton class |
Method Summary | |
boolean |
areSame(org.semwebcentral.sweetrules.ruleml.sweetrulemlobjectmodel.AndhType andh1,
org.semwebcentral.sweetrules.ruleml.sweetrulemlobjectmodel.AndhType andh2)
Compares two andh elements for equality |
boolean |
areSame(org.semwebcentral.sweetrules.ruleml.sweetrulemlobjectmodel.AtomType atom1,
org.semwebcentral.sweetrules.ruleml.sweetrulemlobjectmodel.AtomType atom2)
Compares two atoms for equality |
boolean |
areSame(org.semwebcentral.sweetrules.ruleml.sweetrulemlobjectmodel.CslitType cslit1,
org.semwebcentral.sweetrules.ruleml.sweetrulemlobjectmodel.CslitType cslit2)
Compares two csliteral for equality |
boolean |
areSame(org.semwebcentral.sweetrules.ruleml.sweetrulemlobjectmodel.CtermType cterm1,
org.semwebcentral.sweetrules.ruleml.sweetrulemlobjectmodel.CtermType cterm2)
Compares the two Cterms to see if they are same |
boolean |
areSame(org.semwebcentral.sweetrules.ruleml.sweetrulemlobjectmodel.FactType fact1,
org.semwebcentral.sweetrules.ruleml.sweetrulemlobjectmodel.FactType fact2)
Checks if the two input facts are equal. |
boolean |
areSame(org.semwebcentral.sweetrules.ruleml.sweetrulemlobjectmodel.HeadType head1,
org.semwebcentral.sweetrules.ruleml.sweetrulemlobjectmodel.HeadType head2)
Compares for the equality of two heads |
boolean |
areSame(org.semwebcentral.sweetrules.ruleml.sweetrulemlobjectmodel.IndType ind1,
org.semwebcentral.sweetrules.ruleml.sweetrulemlobjectmodel.IndType ind2)
Compares two ind values for equality |
boolean |
areSame(org.semwebcentral.sweetrules.ruleml.sweetrulemlobjectmodel.OprType opr1,
org.semwebcentral.sweetrules.ruleml.sweetrulemlobjectmodel.OprType opr2)
Compares two oprs |
boolean |
areSame(org.semwebcentral.sweetrules.ruleml.sweetrulemlobjectmodel.RelType rel1,
org.semwebcentral.sweetrules.ruleml.sweetrulemlobjectmodel.RelType rel2)
Compares two rel values |
boolean |
areSame(org.semwebcentral.sweetrules.ruleml.sweetrulemlobjectmodel.RlabType rlab1,
org.semwebcentral.sweetrules.ruleml.sweetrulemlobjectmodel.RlabType rlab2)
Compares two rule labels |
boolean |
areSame(org.semwebcentral.sweetrules.ruleml.sweetrulemlobjectmodel.Var var1,
org.semwebcentral.sweetrules.ruleml.sweetrulemlobjectmodel.Var var2)
Compares two variables for equality |
boolean |
areSameTerms(java.util.List indOrVarOrCtermList1,
java.util.List indOrVarOrCtermList2)
Compares two term lists for equality |
boolean |
bothObjectsNull(java.lang.Object obj1,
java.lang.Object obj2)
Compares two objects for nullity |
static SweetEqualityChecker |
getInstance()
Accessor method for the single ton class |
boolean |
onlyOneObjectNull(java.lang.Object obj1,
java.lang.Object obj2)
Checks if only one of the objects is null and the other isn't |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static SweetEqualityChecker sweetEqualityChecker
Constructor Detail |
private SweetEqualityChecker()
Method Detail |
public static SweetEqualityChecker getInstance()
public boolean areSame(org.semwebcentral.sweetrules.ruleml.sweetrulemlobjectmodel.FactType fact1, org.semwebcentral.sweetrules.ruleml.sweetrulemlobjectmodel.FactType fact2)
fact1
- The first factfact2
- The second fact
public boolean areSame(org.semwebcentral.sweetrules.ruleml.sweetrulemlobjectmodel.RlabType rlab1, org.semwebcentral.sweetrules.ruleml.sweetrulemlobjectmodel.RlabType rlab2)
rlab1
- First rule labelrlab2
- Second rule label
public boolean areSame(org.semwebcentral.sweetrules.ruleml.sweetrulemlobjectmodel.HeadType head1, org.semwebcentral.sweetrules.ruleml.sweetrulemlobjectmodel.HeadType head2)
head1
- The first head argumenthead2
- The second head argument
public boolean areSame(org.semwebcentral.sweetrules.ruleml.sweetrulemlobjectmodel.AtomType atom1, org.semwebcentral.sweetrules.ruleml.sweetrulemlobjectmodel.AtomType atom2)
atom1
- The first atomatom2
- The second atom
public boolean areSame(org.semwebcentral.sweetrules.ruleml.sweetrulemlobjectmodel.OprType opr1, org.semwebcentral.sweetrules.ruleml.sweetrulemlobjectmodel.OprType opr2)
opr1
- The first opropr2
- The second opr
public boolean areSame(org.semwebcentral.sweetrules.ruleml.sweetrulemlobjectmodel.RelType rel1, org.semwebcentral.sweetrules.ruleml.sweetrulemlobjectmodel.RelType rel2)
rel1
- The first rel valuerel2
- The second rel value
public boolean areSame(org.semwebcentral.sweetrules.ruleml.sweetrulemlobjectmodel.CslitType cslit1, org.semwebcentral.sweetrules.ruleml.sweetrulemlobjectmodel.CslitType cslit2)
cslit1
- The first cslitcslit2
- The second cslit
public boolean areSame(org.semwebcentral.sweetrules.ruleml.sweetrulemlobjectmodel.AndhType andh1, org.semwebcentral.sweetrules.ruleml.sweetrulemlobjectmodel.AndhType andh2)
andh1
- The first andh elementandh2
- The second andh element
public boolean areSameTerms(java.util.List indOrVarOrCtermList1, java.util.List indOrVarOrCtermList2)
indOrVarOrCtermList1
- The first term listindOrVarOrCtermList2
- The second term list
public boolean areSame(org.semwebcentral.sweetrules.ruleml.sweetrulemlobjectmodel.IndType ind1, org.semwebcentral.sweetrules.ruleml.sweetrulemlobjectmodel.IndType ind2)
ind1
- The first ind valueind2
- The second ind value
public boolean areSame(org.semwebcentral.sweetrules.ruleml.sweetrulemlobjectmodel.CtermType cterm1, org.semwebcentral.sweetrules.ruleml.sweetrulemlobjectmodel.CtermType cterm2)
cterm1
- The first ctermcterm2
- The second cterm
public boolean areSame(org.semwebcentral.sweetrules.ruleml.sweetrulemlobjectmodel.Var var1, org.semwebcentral.sweetrules.ruleml.sweetrulemlobjectmodel.Var var2)
var1
- The first variablevar2
- The second variable
public boolean bothObjectsNull(java.lang.Object obj1, java.lang.Object obj2)
obj1
- The first objectobj2
- The second object
public boolean onlyOneObjectNull(java.lang.Object obj1, java.lang.Object obj2)
obj1
- The first objectobj2
- The second object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |