org.fest.assertions.condition
Class AnyOf<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.AnyOf<T>
Type Parameters:
T - the type of object this condition accepts.
All Implemented Interfaces:
Descriptable<Condition<T>>

public class AnyOf<T>
extends Join<T>

Returns true if any of the joined conditions is satisfied.

Author:
Yvonne Wang

Method Summary
static
<T> Condition<T>
anyOf(Collection<Condition<T>> conditions)
          Creates a new AnyOf
static
<T> Condition<T>
anyOf(Condition<T>... conditions)
          Creates a new AnyOf
 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

anyOf

public static <T> Condition<T> anyOf(Condition<T>... conditions)
Creates a new AnyOf

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.

anyOf

public static <T> Condition<T> anyOf(Collection<Condition<T>> conditions)
Creates a new AnyOf

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.