org.vizzini.ai.logic
Class ComplexSentenceNOT
java.lang.Object
org.vizzini.util.AbstractBean
org.vizzini.ai.logic.AbstractSentence
org.vizzini.ai.logic.AbstractComplexSentence
org.vizzini.ai.logic.ComplexSentenceNOT
- All Implemented Interfaces:
- Cloneable, IComplexSentence, ISentence
public class ComplexSentenceNOT
- extends AbstractComplexSentence
Provides a complex sentence using the NOT connective. This is a degenerate
case of a complex sentence as the left sentence is not used. 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)
ComplexSentenceNOT
protected ComplexSentenceNOT(ISentence right)
- Construct this object using the given parameter.
- Parameters:
right
- - Since:
- v0.2
evaluate
public boolean evaluate(Object contextItem)
throws LogicException
- Return true if this expression, using the given object, evaluates to
true.
- Parameters:
contextItem
- Item in whose context to evaluate this sentence.
- Throws:
LogicException
- Since:
- v0.2
getConnective
public ConnectiveType getConnective()
- Description copied from interface:
IComplexSentence
- Return the connective.
- Returns:
- Return connectiveType.
- Since:
- v0.2
isLeftRequired
protected boolean isLeftRequired()
- Return true if the left sentence is required.
- Overrides:
isLeftRequired
in class AbstractComplexSentence
- Since:
- v0.2
Copyright © 2007 Vizzini.org. All Rights Reserved.
|
2007.12.25.03.00.02 |