org.vizzini.ai.logic
Interface IComplexSentence

All Superinterfaces:
Cloneable, ISentence
All Known Implementing Classes:
AbstractComplexSentence, ComplexSentenceAND, ComplexSentenceIFF, ComplexSentenceIMPLIES, ComplexSentenceNOT, ComplexSentenceOR

public interface IComplexSentence
extends ISentence

Defines methods required by complex sentences in the logic system. A complex sentence consists of a left sentence, a connective, and a right sentence. The sentence evaluates to true or false in the context of a given item.

Since:
v0.2
Version:
v0.2
Author:
Jeffrey M. Thompson

Method Summary
 ConnectiveType getConnective()
          Return the connective.
 ISentence getLeft()
          Return the left sentence.
 ISentence getRight()
          Return the right sentence.
 boolean isChild(ISentence sentence)
          Return true if the given sentence is a child of this.
 void replaceChild(ISentence oldChild, ISentence newChild)
          Replace the given old child sentence with the given new child sentence if there is a match.
 
Methods inherited from interface org.vizzini.ai.logic.ISentence
clone, evaluate, getDescription, setDescription
 

Method Detail

getConnective

ConnectiveType getConnective()
Return the connective.

Since:
v0.2

getLeft

ISentence getLeft()
Return the left sentence.

Since:
v0.2

getRight

ISentence getRight()
Return the right sentence.

Since:
v0.2

isChild

boolean isChild(ISentence sentence)
Return true if the given sentence is a child of this.

Parameters:
sentence - Candidate child sentence. (required)
Since:
v0.2

replaceChild

void replaceChild(ISentence oldChild,
                  ISentence newChild)
Replace the given old child sentence with the given new child sentence if there is a match.

Parameters:
oldChild - Old child sentence. (required)
newChild - New child sentence. (required)
Since:
v0.2


Copyright © 2007 Vizzini.org. All Rights Reserved. 2007.12.25.03.00.02