org.vizzini.ai.logic
Class ComplexSentenceAND

java.lang.Object
  extended by org.vizzini.util.AbstractBean
      extended by org.vizzini.ai.logic.AbstractSentence
          extended by org.vizzini.ai.logic.AbstractComplexSentence
              extended by org.vizzini.ai.logic.ComplexSentenceAND
All Implemented Interfaces:
Cloneable, IComplexSentence, ISentence

public class ComplexSentenceAND
extends AbstractComplexSentence

Provides a complex sentence using the AND connective. Instances of this class are obtained from SentenceFactory.create().

Since:
v0.2
Version:
v0.2
Author:
Jeffrey M. Thompson
See Also:
SentenceFactory.create(org.vizzini.ai.logic.IArgument, java.lang.String, org.vizzini.ai.logic.IArgument)

Field Summary
 
Fields inherited from class org.vizzini.util.AbstractBean
IGNORE_PROPERTIES
 
Constructor Summary
protected ComplexSentenceAND(ISentence left, ISentence right)
          Construct this object using the given parameters.
 
Method Summary
 boolean evaluate(Object contextItem)
          Return true if this expression, using the given object, evaluates to true.
 ConnectiveType getConnective()
          Return the connective.
 
Methods inherited from class org.vizzini.ai.logic.AbstractComplexSentence
clone, getLeft, getRight, isChild, isLeftRequired, replaceChild, setLeft, setRight
 
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.ISentence
getDescription, setDescription
 

Constructor Detail

ComplexSentenceAND

protected ComplexSentenceAND(ISentence left,
                             ISentence right)
Construct this object using the given parameters.

Parameters:
left - Left sentence.
right - Right sentence.
Since:
v0.2
Method Detail

evaluate

public boolean evaluate(Object contextItem)
                 throws LogicException
Return true if this expression, using the given object, evaluates to true.

Parameters:
contextItem - Context item.
Throws:
LogicException
Since:
v0.2

getConnective

public ConnectiveType getConnective()
Description copied from interface: IComplexSentence
Return the connective.

Returns:
Return connectiveType.
Since:
v0.2


Copyright 2007 Vizzini.org. All Rights Reserved. 2007.12.25.03.00.02