fcmodeler.mapping
Class OrConnective
java.lang.Object
|
+--fcmodeler.mapping.OrConnective
- All Implemented Interfaces:
- Connective
- public final class OrConnective
- extends java.lang.Object
- implements Connective
A Connective representing the OR logical connective. This class is a Singleton;
the getInstance method provides access to the only OrConnective instance.
- Since:
- JDK1.3
- Version:
- $Revision: 1.1 $
- Author:
- Julie Dickerson , Zach Cox
|
Method Summary |
boolean |
evaluate(boolean first,
boolean second)
Evaluates the sentence first OR second. |
static OrConnective |
getInstance()
Returns the only instance of OrConnective. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
evaluate
public boolean evaluate(boolean first,
boolean second)
- Evaluates the sentence
first OR second.
- Specified by:
evaluate in interface Connective
- Parameters:
first - the first term in the sentence.second - the second term in the sentence.- Returns:
true if first || second evaluates to true; false otherwise.
getInstance
public static OrConnective getInstance()
- Returns the only instance of
OrConnective.
- Returns:
- the only instance of
OrConnective.
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object