fcmodeler.mapping
Class AndConnective
java.lang.Object
|
+--fcmodeler.mapping.AndConnective
- All Implemented Interfaces:
- Connective
- public final class AndConnective
- extends java.lang.Object
- implements Connective
A Connective
representing the AND logical operator. This class is a Singleton;
the getInstance
method provides access to the only AndConnective
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 AND second . |
static AndConnective |
getInstance()
Returns the only instance of AndConnective . |
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
AND 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 AndConnective getInstance()
- Returns the only instance of
AndConnective
.
- Returns:
- the only instance of
AndConnective
.
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object