de.javagl.swogl
Class Conditions

java.lang.Object
  extended by de.javagl.swogl.Conditions

public class Conditions
extends java.lang.Object

This class contains utility methods for creating Conditions


Method Summary
static
<T> Condition<T>
and(Condition<T> c0, Condition<T> c1)
          Returns a new Condition that is the conjunction of the given conditions.
static
<T> Condition<T>
falseCondition()
          Returns a new Condition that is always false
static
<T> Condition<T>
not(Condition<T> condition)
          Returns a new Condition that is the negation of the given condition.
static
<T> Condition<T>
or(Condition<T> c0, Condition<T> c1)
          Returns a new Condition that is the disjunction of the given conditions.
static
<T> Condition<T>
trueCondition()
          Returns a new Condition that is always true
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

trueCondition

public static <T> Condition<T> trueCondition()
Returns a new Condition that is always true

Type Parameters:
T - The type of the objects for the condition
Returns:
The new condition.

falseCondition

public static <T> Condition<T> falseCondition()
Returns a new Condition that is always false

Type Parameters:
T - The type of the objects for the condition
Returns:
The new condition.

not

public static <T> Condition<T> not(Condition<T> condition)
Returns a new Condition that is the negation of the given condition.

Type Parameters:
T - The type of the objects for the condition
Parameters:
condition - The condition to negate
Returns:
The new condition.

and

public static <T> Condition<T> and(Condition<T> c0,
                                   Condition<T> c1)
Returns a new Condition that is the conjunction of the given conditions.

Type Parameters:
T - The type of the objects for the condition
Parameters:
c0 - The first condition
c1 - The second condition
Returns:
The new condition.

or

public static <T> Condition<T> or(Condition<T> c0,
                                  Condition<T> c1)
Returns a new Condition that is the disjunction of the given conditions.

Type Parameters:
T - The type of the objects for the condition
Parameters:
c0 - The first condition
c1 - The second condition
Returns:
The new condition.