public class DerivedPredicate
extends java.lang.Object
implements java.io.Serializable
Constructor and Description |
---|
DerivedPredicate(NamedTypedList head,
Exp body)
Creates a new derived predicate with a specific head and body.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj)
Returns if this derived predicate is equal to another object.
|
Exp |
getBody()
Returns the body of the derived predicate.
|
NamedTypedList |
getHead()
Returns the head of the derived predicate.
|
int |
hashCode()
Returns the hash code value of the derived predicate.
|
void |
normalize()
Normalizes the derived predicates, i.e, renames the variables contained in the derived
predicate and move the negation inward.
|
void |
setBody(Exp body)
Sets the body of this derived predicate.
|
void |
setHead(NamedTypedList head)
Sets the head of the derived predicate.
|
java.lang.String |
toString()
Returns a string representation of this derived predicate.
|
public DerivedPredicate(NamedTypedList head, Exp body)
head
- the head of the derived predicate.body
- the body of the derived predicate.public final NamedTypedList getHead()
public final void setHead(NamedTypedList head)
head
- the head to set.public final Exp getBody()
public final void setBody(Exp body)
body
- the body to set.public void normalize()
Exp.renameVariables()
,
Exp.moveNegationInward()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- the other object.true
if obj
is not null
, is an instance
of the class DerivedPredicate
and has the same head and body;
otherwise it returns false
.Object.equals(java.lang.Object)
public int hashCode()
hashCode
in class java.lang.Object
Object.hashCode()
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()