org.fest.assertions.condition
Class AllOf<T>

java.lang.Object
  extended by org.fest.assertions.core.Condition<T>
      extended by org.fest.assertions.condition.Join<T>
          extended by org.fest.assertions.condition.AllOf<T>
Type Parameters:
T - the type of object this condition accepts.
All Implemented Interfaces:
Descriptable<Condition<T>>

public class AllOf<T>
extends Join<T>

Returns true if all of the joined conditions is satisfied.

Author:
Yvonne Wang

Method Summary
static
<T> Condition<T>
allOf(Collection<Condition<T>> conditions)
          Creates a new AllOf
static
<T> Condition<T>
allOf(Condition<T>... conditions)
          Creates a new AllOf
 boolean matches(T value)
          Verifies that the given value satisfies this condition.
 String toString()
           
 
Methods inherited from class org.fest.assertions.condition.Join
conditions
 
Methods inherited from class org.fest.assertions.core.Condition
as, as, describedAs, describedAs, description
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

allOf

public static <T> Condition<T> allOf(Condition<T>... conditions)
Creates a new AllOf

Type Parameters:
T - the type of object the given condition accept.
Parameters:
conditions - the conditions to evaluate.
Returns:
the created AnyOf.
Throws:
NullPointerException - if the given array is null.
NullPointerException - if any of the elements in the given array is null.

allOf

public static <T> Condition<T> allOf(Collection<Condition<T>> conditions)
Creates a new AllOf

Type Parameters:
T - the type of object the given condition accept.
Parameters:
conditions - the conditions to evaluate.
Returns:
the created AnyOf.
Throws:
NullPointerException - if the given collection is null.
NullPointerException - if any of the elements in the given collection is null.

matches

public boolean matches(T value)
Verifies that the given value satisfies this condition.

Specified by:
matches in class Condition<T>
Parameters:
value - the value to verify.
Returns:
true if the given value satisfies this condition; false otherwise.

toString

public String toString()
Overrides:
toString in class Condition<T>


Copyright © 2007-2012 FEST (Fixtures for Easy Software Testing). All Rights Reserved.