|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jscience.computing.ai.planning.NumberedPredicate
public class NumberedPredicate
This class represents a predicate with an integer number associated with it. It serves two different purposes: First, to represent a protection on some predicate (the integer number being the number of times the predicate is protected), and second, when a predicate is deleted from the current state of the world, an object of this class represents the deleted predicate and where it was deleted from so that in case of a backtrack the deleted predicate can be added back exactly where it was before.
| Constructor Summary | |
|---|---|
NumberedPredicate(Predicate preIn)
To initialize an object of this class. |
|
NumberedPredicate(Predicate preIn,
int numberIn)
To initialize an object of this class. |
|
| Method Summary | |
|---|---|
boolean |
dec()
To decrease the integer by one. |
int |
getHead()
To get the head of the predicate. |
int |
getNumber()
To get the integer associated with this object. |
Term |
getParam()
To get the parameters of the predicate. |
void |
inc()
To increase the integer by one. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public NumberedPredicate(Predicate preIn)
preIn - the predicate.
public NumberedPredicate(Predicate preIn,
int numberIn)
preIn - the predicate.numberIn - the integer.| Method Detail |
|---|
public boolean dec()
false if the integer become zero, true
otherwise.public int getHead()
public int getNumber()
public Term getParam()
public void inc()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||