| java.lang.Object org.mandarax.kernel.AbstractPredicate
AbstractPredicate | abstract public class AbstractPredicate implements Predicate(Code) | | Abstract super class for predicates. Mainly equals()
and hashCode() are implemented here. Implementations of Predicate
should consider to subclass this class in order to use these implementations.
The idea is to allow also instances of different classes to be equal, since these instances
could for example represent the same predicate using different data sources.
Note that properties of instances of this class are inmutable. This can be used to cache the hash!
author: Jens Dietrich version: 3.4 <7 March 05> since: 1.0 |
Method Summary | |
public boolean | equals(Object obj) Indicates whether the two objects are equal. | abstract public String | getName() Get the name of the predicate. | abstract public Class[] | getStructure() Get the type structure of the object, e.g. | public int | hashCode() Get the hash code of the object. |
cachedHashCode | protected int cachedHashCode(Code) | | |
equals | public boolean equals(Object obj)(Code) | | Indicates whether the two objects are equal. This method invokes
comparing the names and checking the structure types for compatibility (and not for
identity!).
Parameters: obj - the object to compare this predicate with true if the objects are equal, false otherwise |
getName | abstract public String getName()(Code) | | Get the name of the predicate.
the name of the predicate |
getStructure | abstract public Class[] getStructure()(Code) | | Get the type structure of the object, e.g. the types of terms.
the structure of the predicate |
hashCode | public int hashCode()(Code) | | Get the hash code of the object.
the hash code value |
|
|