|
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
|
static ExtendedBoolean |
MaybeEB
|
static ExtendedBoolean |
TrueEB
|
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 |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
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 |