* * *

|  [ **Overview** ](../../overview-summary.html) |  [ **Package** ](package-summary.html) |  **Class** |  [ **Use** ](class-use/Condition.html) |  [ **Tree** ](package-tree.html) |  [ **Deprecated** ](../../deprecated-list.html) |  [ **Index** ](../../index-all.html) |  [ **Help** ](../../help-doc.html)  
---|---|---|---|---|---|---|---  
__  
[ **PREV CLASS** ](../../org/hamcrest/BaseMatcher.html "class in org.hamcrest") [ **NEXT CLASS** ](../../org/hamcrest/Condition.Step.html "interface in org.hamcrest") |  [ **FRAMES** ](../../index.html?org/hamcrest/Condition.html) [ **NO FRAMES** ](Condition.html) [ **All Classes** ](../../allclasses-noframe.html)  
SUMMARY:  NESTED  |  FIELD  | CONSTR |  METHOD  |  DETAIL:  FIELD  | CONSTR |  METHOD   
  
* * *

##  org.hamcrest  
Class Condition<T>

    
    
    java.lang.Object
      ![extended by ](../../resources/inherit.gif)**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 ](../../org/hamcrest/Condition.Step.html "interface in org.hamcrest") < [ I ](../../org/hamcrest/Condition.Step.html "type parameter in Condition.Step") , [ O ](../../org/hamcrest/Condition.Step.html "type parameter in Condition.Step") > ** `   
  
**Field Summary**  
---  
` static [ org.hamcrest.Condition.NotMatched ](http://kentbeck.github.com/junit/javadoc/latest/org/hamcrest/Condition.NotMatched.html?is-external=true "class or interface in org.hamcrest") <java.lang.Object> ` |  ` **[ NOT_MATCHED ](../../org/hamcrest/Condition.html#NOT_MATCHED) ** `   
  
**Method Summary**  
---  
` abstract  |  ` <U> [ Condition ](../../org/hamcrest/Condition.html "class in org.hamcrest") <U> `  
---  
` ` **[ and
](../../org/hamcrest/Condition.html#and\(org.hamcrest.Condition.Step\)) ** ( [
Condition.Step ](../../org/hamcrest/Condition.Step.html "interface in
org.hamcrest") <? super [ T ](../../org/hamcrest/Condition.html "type
parameter in Condition") ,U> mapping) `  
  
` static  |  ` <T> [ Condition ](../../org/hamcrest/Condition.html "class in org.hamcrest") <T> `  
---  
` ` **[ matched ](../../org/hamcrest/Condition.html#matched\(T,
org.hamcrest.Description\)) ** (T theValue, [ Description
](../../org/hamcrest/Description.html "interface in org.hamcrest") mismatch) `  
  
` boolean ` |  ` **[ matching ](../../org/hamcrest/Condition.html#matching\(org.hamcrest.Matcher\)) ** ( [ Matcher ](../../org/hamcrest/Matcher.html "interface in org.hamcrest") < [ T ](../../org/hamcrest/Condition.html "type parameter in Condition") > match) `   
  
` abstract boolean ` |  ` **[ matching ](../../org/hamcrest/Condition.html#matching\(org.hamcrest.Matcher, java.lang.String\)) ** ( [ Matcher ](../../org/hamcrest/Matcher.html "interface in org.hamcrest") < [ T ](../../org/hamcrest/Condition.html "type parameter in Condition") > match, java.lang.String message) `   
  
` static  |  ` <T> [ Condition ](../../org/hamcrest/Condition.html "class in org.hamcrest") <T> `  
---  
` ` **[ notMatched ](../../org/hamcrest/Condition.html#notMatched\(\)) ** () `  
  
` |  ` <U> [ Condition ](../../org/hamcrest/Condition.html "class in org.hamcrest") <U> `  
---  
` ` **[ then
](../../org/hamcrest/Condition.html#then\(org.hamcrest.Condition.Step\)) ** (
[ Condition.Step ](../../org/hamcrest/Condition.Step.html "interface in
org.hamcrest") <? super [ T ](../../org/hamcrest/Condition.html "type
parameter in Condition") ,U> mapping) `  
  
**Methods inherited from class java.lang.Object**  
--