org.semwebcentral.sweetrules.analyzer
Class SweetPredicate

java.lang.Object
  extended byorg.semwebcentral.sweetrules.analyzer.SweetPredicate
Direct Known Subclasses:
SweetStratifiedPredicate

public class SweetPredicate
extends java.lang.Object

Created on Nov 5, 2004 Provides an abstraction of a predicate

Author:
Shashidhara K Ganjugunte, Dr. Benjamin Grosof, Dr. Said Tabet, Chitravanu Neogy

Field Summary
private  int predicateArity
          The predicate arity
private  java.lang.String predicateName
          The predicate name
 
Constructor Summary
SweetPredicate(java.lang.String name, int arity)
          The predicate
 
Method Summary
 boolean equals(java.lang.Object other)
          Case sensitive equals method for a predicate
 boolean equalsIgnoreCase(SweetPredicate otherPred)
          Case insensitive equals method for a predicate
 int getPredicateArity()
          Get method for predicate arity
 java.lang.String getPredicateName()
          The set method for predicate name
 int hashCode()
          The override method for getting the hashCode based on predicateName and arity
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

predicateArity

private int predicateArity
The predicate arity


predicateName

private java.lang.String predicateName
The predicate name

Constructor Detail

SweetPredicate

public SweetPredicate(java.lang.String name,
                      int arity)
The predicate

Parameters:
name - The name of the predicate
arity - The arity of the predicate
Method Detail

equals

public boolean equals(java.lang.Object other)
Case sensitive equals method for a predicate

Returns:
true if both are equal
Throws:
java.lang.ClassCastException - if the other object is not of type SweetPredicate

hashCode

public int hashCode()
The override method for getting the hashCode based on predicateName and arity


equalsIgnoreCase

public boolean equalsIgnoreCase(SweetPredicate otherPred)
Case insensitive equals method for a predicate

Parameters:
otherPred - The other predicate
Returns:
true if both are equal

getPredicateArity

public int getPredicateArity()
Get method for predicate arity

Returns:
predicate arity

getPredicateName

public java.lang.String getPredicateName()
The set method for predicate name

Returns:
The name of the predicate