public abstract class AbstractCompoundTerm extends java.lang.Object implements CompoundTerm
CompoundTerm
interface.
Subclass AbstractCompoundTerm if you are creating a class which implements
CompoundTerm
. This abstract class provides some of the methods required.
CompoundTerm
,
CompoundTermImpl
Constructor and Description |
---|
AbstractCompoundTerm(java.lang.String functor,
int arity)
Construct an AbstractCompoundTerm with a given functor and arity.
|
Modifier and Type | Method and Description |
---|---|
int |
arity()
Return the arity.
|
boolean |
equals(java.lang.Object obj)
Overrides
equals() in java.lang.Object. |
java.lang.String |
functor()
Returns the functor.
|
int |
hashCode() |
getClass, notify, notifyAll, toString, wait, wait, wait
arg
public AbstractCompoundTerm(java.lang.String functor, int arity)
public java.lang.String functor()
functor
in interface CompoundTerm
public int arity()
arity
in interface CompoundTerm
public boolean equals(java.lang.Object obj)
equals()
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 of equals()
return true between each of this object's arguments and the corresponding
argument of the parameter object.equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object