Package com.parctechnologies.eclipse
Class AbstractCompoundTerm
- java.lang.Object
-
- com.parctechnologies.eclipse.AbstractCompoundTerm
-
- All Implemented Interfaces:
CompoundTerm
- Direct Known Subclasses:
Atom,CompoundTermImpl
public abstract class AbstractCompoundTerm extends java.lang.Object implements CompoundTerm
A useful superclass for objects implementing theCompoundTerminterface.Subclass AbstractCompoundTerm if you are creating a class which implements
CompoundTerm. This abstract class provides some of the methods required.- See Also:
CompoundTerm,CompoundTermImpl
-
-
Constructor Summary
Constructors Constructor Description AbstractCompoundTerm(java.lang.String functor, int arity)Construct an AbstractCompoundTerm with a given functor and arity.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intarity()Return the arity.booleanequals(java.lang.Object obj)Overridesequals()in java.lang.Object.java.lang.Stringfunctor()Returns the functor.inthashCode()-
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.parctechnologies.eclipse.CompoundTerm
arg
-
-
-
-
Method Detail
-
functor
public java.lang.String functor()
Returns the functor.- Specified by:
functorin interfaceCompoundTerm
-
arity
public int arity()
Return the arity.- Specified by:
arityin interfaceCompoundTerm
-
equals
public boolean equals(java.lang.Object obj)
Overridesequals()in java.lang.Object. Returns true iff the parameter Object implements CompoundTerm and its functor and arity are equal to this object's and pairwise invocations ofequals()return true between each of this object's arguments and the corresponding argument of the parameter object.- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-