Class Condition<T>

java.lang.Object
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.
  • Field Details

    • description

      private String description
  • Constructor Details

    • Condition

      public Condition()
      Creates a new Condition.
    • Condition

      public Condition(String description)
      Creates a new Condition.
      Parameters:
      description - the description of this condition.
  • Method Details

    • as

      public final Condition<T> as(String newDescription)
      Sets the description of this condition.
      Parameters:
      newDescription - the description to set.
      Returns:
      this condition.
    • addDescriptionTo

      final String addDescriptionTo(String s)
    • 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.