org.fest.assertions
Class Condition<T>

java.lang.Object
  extended by org.fest.assertions.Condition<T>
Type Parameters:
T - the type of Object this condition accepts.

public abstract class Condition<T>
extends Object

Understands a condition to be met by a given Object.

Author:
Yvonne Wang, Alex Ruiz

Constructor Summary
Condition()
          Creates a new Condition.
Condition(String description)
          Creates a new Condition.
 
Method Summary
 Condition<T> as(String newDescription)
          Sets the description of this condition.
 String description()
          Returns the description of this condition, if any.
abstract  boolean matches(T value)
          Verifies that the given value satisfies this condition.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Condition

public Condition()
Creates a new Condition.


Condition

public Condition(String description)
Creates a new Condition.

Parameters:
description - the description of this condition.
Method Detail

as

public final Condition<T> as(String newDescription)
Sets the description of this condition.

Parameters:
newDescription - the description to set.
Returns:
this condition.

description

public final String description()
Returns the description of this condition, if any.

Returns:
the description of this condition.

matches

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

Parameters:
value - the value to verify.
Returns:
true if the given value satisfies this condition, false otherwise.


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