|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.vizzini.util.AbstractBean
org.vizzini.ai.logic.AbstractSentence
org.vizzini.ai.logic.AbstractComplexSentence
public abstract class AbstractComplexSentence
Provides base functionality for complex sentences in the logic system. A complex sentence consists of a left argument, a connective, and a right argument. The sentence evaluates to true or false in the context of a given item.
Field Summary |
---|
Fields inherited from class org.vizzini.util.AbstractBean |
---|
IGNORE_PROPERTIES |
Constructor Summary | |
---|---|
AbstractComplexSentence(ISentence left,
ISentence right)
Construct this object using the given parameters. |
Method Summary | |
---|---|
Object |
clone()
Return a clone of this instance. |
ISentence |
getLeft()
Return the left sentence. |
ISentence |
getRight()
Return the right sentence. |
boolean |
isChild(ISentence child)
Return true if the given sentence is a child of this. |
protected boolean |
isLeftRequired()
Return true if the left sentence is required. |
void |
replaceChild(ISentence oldChild,
ISentence newChild)
Replace the given old child sentence with the given new child sentence if there is a match. |
protected void |
setLeft(ISentence left)
|
protected void |
setRight(ISentence right)
|
Methods inherited from class org.vizzini.ai.logic.AbstractSentence |
---|
getDescription, setDescription |
Methods inherited from class org.vizzini.util.AbstractBean |
---|
appendArray, appendCollection, appendList, appendMap, compareBooleans, compareObjects, equals, getIgnoreProperties, hashCode, toString |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.vizzini.ai.logic.IComplexSentence |
---|
getConnective |
Methods inherited from interface org.vizzini.ai.logic.ISentence |
---|
evaluate, getDescription, setDescription |
Constructor Detail |
---|
public AbstractComplexSentence(ISentence left, ISentence right)
left
- right
- Method Detail |
---|
public Object clone()
clone
in interface ISentence
clone
in class AbstractSentence
public ISentence getLeft()
IComplexSentence
getLeft
in interface IComplexSentence
public ISentence getRight()
IComplexSentence
getRight
in interface IComplexSentence
public boolean isChild(ISentence child)
isChild
in interface IComplexSentence
child
- Candidate child sentence. (required)public void replaceChild(ISentence oldChild, ISentence newChild)
replaceChild
in interface IComplexSentence
oldChild
- Old child sentence. (required)newChild
- New child sentence. (required)protected boolean isLeftRequired()
protected void setLeft(ISentence left)
left
- The left to set.protected void setRight(ISentence right)
right
- The right to set. (required)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2007 Vizzini.org. All Rights Reserved. | 2007.12.25.03.00.02 |