|
tauZaman v0.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--tauzaman.timestamp.ExtendedBoolean
ExtendedBoolean
class implements the boolean algebra for
a Three-Valued Logic.
For example:
ExtendedBoolean trueValue = new ExtendedBoolean(true); ExtendedBoolean falseValue = new ExtendedBoolean(false); // Maybe values are currently unsupported, but eventually... ExtendedBoolean maybeValue = new ExtendedBoolean(); if ((trueValue.or(falseValue)).satisfied()) { // works, should be satisfied } if (!maybeValue.satisfied()) { // works, maybe is not satisfied } if (maybeValue.unsatisfied()) { // works, maybe is not unsatisfied either! }
Field Summary | |
static ExtendedBoolean |
FalseEB
|
private static int |
MAYBE
|
static ExtendedBoolean |
MaybeEB
|
private static int |
SATISFIED
|
private int |
status
|
static ExtendedBoolean |
TrueEB
|
private static int |
UNSATISFIED
|
Constructor Summary | |
ExtendedBoolean()
Build a MAYBE value in the ExtendedBoolean logic. |
|
ExtendedBoolean(boolean satisfied)
Build a TRUE or FALSE value in the ExtendedBoolean logic. |
Method Summary | |
ExtendedBoolean |
and(ExtendedBoolean other)
And this one with another. |
boolean |
maybe()
Maybe? |
ExtendedBoolean |
not(ExtendedBoolean other)
Not. |
ExtendedBoolean |
or(ExtendedBoolean other)
Or this one with another. |
boolean |
satisfied()
Satisfied? |
boolean |
unsatisfied()
Unsatisfied? |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final int SATISFIED
private static final int UNSATISFIED
private static final int MAYBE
private int status
public static ExtendedBoolean TrueEB
public static ExtendedBoolean FalseEB
public static ExtendedBoolean MaybeEB
Constructor Detail |
public ExtendedBoolean(boolean satisfied)
satisfied
- - truth condition of the true partpublic ExtendedBoolean()
Method Detail |
public ExtendedBoolean and(ExtendedBoolean other)
other
- - the other one
public ExtendedBoolean or(ExtendedBoolean other)
other
- - the other one
public ExtendedBoolean not(ExtendedBoolean other)
public boolean satisfied()
public boolean unsatisfied()
public boolean maybe()
|
tauZaman v0.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |