|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.asyncobjects.util.Condition
public class Condition
This class implements some logical conditions.
Constructor Summary | |
---|---|
Condition()
|
Method Summary | ||
---|---|---|
static Promise<Boolean> |
and(Promise<Boolean>... args)
This operations finishes with true only if all promises resolve to true. |
|
static Promise<Boolean> |
falsePromise()
|
|
static Promise<Boolean> |
not(Promise<Boolean> v)
Logical not operation. |
|
static Promise<Boolean> |
or(Promise<Boolean>... args)
This operations finishes with false only if all promises resolve to false. |
|
static Promise<Boolean> |
truePromise()
|
|
static Promise<Boolean> |
valueOf(boolean value)
Return promise that represents a boolean value |
|
static
|
was(T expected,
Promise<?> actual)
Check if value matches expected using Object.equals(Object) . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Condition()
Method Detail |
---|
public static Promise<Boolean> truePromise()
public static Promise<Boolean> falsePromise()
public static Promise<Boolean> valueOf(boolean value)
value
- a value to wrap
public static <T> Promise<Boolean> was(T expected, Promise<?> actual)
Object.equals(Object)
.
T
- a type of value to checkexpected
- an expected objectactual
- a promise for actual value
public static Promise<Boolean> not(Promise<Boolean> v)
v
- an promise for boolean value
public static Promise<Boolean> and(Promise<Boolean>... args)
args
- argument promises
public static Promise<Boolean> or(Promise<Boolean>... args)
args
- argument promises
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |