|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectlp.struct.util.LpGroundDecider
public class LpGroundDecider
Decides whether a LpStructureUnit is ground, i.e. if it "contains" a
variable (represented by a LpVariable instance) or not.
Accesses the LpStructureUnit instances by implementing the
LpStructureUnitVisitor interface.
| Field Summary | |
|---|---|
private boolean |
ground
Is used to remember the current state between the calls of visit() methods. |
| Constructor Summary | |
|---|---|
LpGroundDecider()
Creates a new instance of LpGroundDecider. |
|
| Method Summary | |
|---|---|
boolean |
isGround(LpStructureUnit unit)
Returns true iff unit doesn't contain a variable
represented by a LpVariable instance. |
void |
visit(LpAtom atom)
Used internally, shouldn't be called directly. |
void |
visit(LpCompoundTerm term)
Used internally, shouldn't be called directly. |
void |
visit(LpConstant con)
Used internally, shouldn't be called directly. |
void |
visit(LpFunction fun)
Used internally, shouldn't be called directly. |
void |
visit(LpLiteral lit)
Used internally, shouldn't be called directly. |
void |
visit(LpPredicate pred)
Used internally, shouldn't be called directly. |
void |
visit(LpRule rule)
Used internally, shouldn't be called directly. |
void |
visit(LpVariable var)
Used internally, shouldn't be called directly. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private boolean ground
visit() methods. If it gets false, the execution of the
current visit() method terminates and
isGround(LpStructureUnit) returns false. If it stays
true, isGround(LpStructureUnit) also returns
true.
| Constructor Detail |
|---|
public LpGroundDecider()
LpGroundDecider.
| Method Detail |
|---|
public boolean isGround(LpStructureUnit unit)
true iff unit doesn't contain a variable
represented by a LpVariable instance.
unit - the LpStructureUnit instance to examine
true if unit is ground, and false
otherwisepublic void visit(LpConstant con)
visit in interface LpStructureUnitVisitorcon - the LpConstant to visitLpStructureUnitVisitor.visit(LpConstant)public void visit(LpVariable var)
visit in interface LpStructureUnitVisitorvar - the LpVariable to visitLpStructureUnitVisitor.visit(LpVariable)public void visit(LpFunction fun)
visit in interface LpStructureUnitVisitorfun - the LpFunction to visitLpStructureUnitVisitor.visit(LpFunction)public void visit(LpCompoundTerm term)
visit in interface LpStructureUnitVisitorterm - the LpCompoundTerm to visitLpStructureUnitVisitor.visit(LpCompoundTerm)public void visit(LpPredicate pred)
visit in interface LpStructureUnitVisitorpred - the LpPredicate to visitLpStructureUnitVisitor.visit(LpPredicate)public void visit(LpAtom atom)
visit in interface LpStructureUnitVisitoratom - the LpAtom to visitLpStructureUnitVisitor.visit(LpAtom)public void visit(LpLiteral lit)
visit in interface LpStructureUnitVisitorlit - the LpLiteral to visitLpStructureUnitVisitor.visit(LpLiteral)public void visit(LpRule rule)
visit in interface LpStructureUnitVisitorrule - the LpRule to visitLpStructureUnitVisitor.visit(LpRule)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||