Condition (Hamcrest)
Date: 2012-07-09

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.hamcrest
Class Condition<T>

    java.lang.Object
      org.hamcrest.Condition<T>

    public abstract class Condition<T>

extends java.lang.Object

A Condition implements part of a multi-step match. We sometimes need to write matchers that have a sequence of steps, where each step depends on the result of the previous step and we can stop processing as soon as a step fails. These classes provide infrastructure for writing such a sequence. Based on https://github.com/npryce/maybe-java

Author:
  Steve Freeman 2012 http://www.hamcrest.com

Nested Class Summary
`static interface` | `Condition.Step<I,O>`

Field Summary
`static org.hamcrest.Condition.NotMatched<java.lang.Object>` | `NOT_MATCHED`

Method Summary
`abstract
`<U> Condition<U>`
` | `and(Condition.Step<? super T,U> mapping)`
`static
`<T> Condition<T>`
` | `matched(T theValue, Description mismatch)`
`boolean` | `matching(Matcher<T> match)`
`abstract boolean` | `matching(Matcher<T> match, java.lang.String message)`
`static
`<T> Condition<T>`
` | `notMatched()`
`
`<U> Condition<U>`
` | `then(Condition.Step<? super T,U> mapping)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### NOT_MATCHED

    public static final org.hamcrest.Condition.NotMatched<java.lang.Object> NOT_MATCHED

Method Detail

### matching

    public abstract boolean matching(Matcher<T> match,
                                     java.lang.String message)

### and

    public abstract <U> Condition<U> and(Condition.Step<? super T,U> mapping)

### matching

    public final boolean matching(Matcher<T> match)

### then

    public final <U> Condition<U> then(Condition.Step<? super T,U> mapping)

### notMatched

    public static <T> Condition<T> notMatched()

### matched

    public static <T> Condition<T> matched(T theValue,
                                           Description mismatch)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD