* * *

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

##  org.hamcrest.core  
Class AnyOf<T>

    
    
    java.lang.Object
      ![extended by ](../../../resources/inherit.gif)[org.hamcrest.BaseMatcher](../../../org/hamcrest/BaseMatcher.html "class in org.hamcrest")<T>
          ![extended by ](../../../resources/inherit.gif)**org.hamcrest.core.AnyOf <T>**
    

**All Implemented Interfaces:**      [ Matcher
](../../../org/hamcrest/Matcher.html "interface in org.hamcrest") <T>, [
SelfDescribing ](../../../org/hamcrest/SelfDescribing.html "interface in
org.hamcrest")

* * *
    
    
    public class **AnyOf <T>**extends [BaseMatcher](../../../org/hamcrest/BaseMatcher.html "class in org.hamcrest")<T>

Calculates the logical disjunction of multiple matchers. Evaluation is
shortcut, so subsequent matchers are not called if an earlier matcher returns
` true ` .

* * *

**Constructor Summary**  
---  
` **[ AnyOf
](../../../org/hamcrest/core/AnyOf.html#AnyOf\(java.lang.Iterable\)) **
(java.lang.Iterable< [ Matcher ](../../../org/hamcrest/Matcher.html "interface
in org.hamcrest") <? super [ T ](../../../org/hamcrest/core/AnyOf.html "type
parameter in AnyOf") >> matchers) `  
  
**Method Summary**  
---  
` static  |  ` <T> [ AnyOf ](../../../org/hamcrest/core/AnyOf.html "class in org.hamcrest.core") <T> `  
---  
` ` **[ anyOf
](../../../org/hamcrest/core/AnyOf.html#anyOf\(java.lang.Iterable\)) **
(java.lang.Iterable< [ Matcher ](../../../org/hamcrest/Matcher.html "interface
in org.hamcrest") <? super T>> matchers) `  
Creates a matcher that matches if the examined object matches **ANY** of the
specified matchers.  
` static  |  ` <T> [ AnyOf ](../../../org/hamcrest/core/AnyOf.html "class in org.hamcrest.core") <T> `  
---  
` ` **[ anyOf
](../../../org/hamcrest/core/AnyOf.html#anyOf\(org.hamcrest.Matcher...\)) ** (
[ Matcher ](../../../org/hamcrest/Matcher.html "interface in org.hamcrest") <?
super T>... matchers) `  
Creates a matcher that matches if the examined object matches **ANY** of the
specified matchers.  
` static  |  ` <T> [ AnyOf ](../../../org/hamcrest/core/AnyOf.html "class in org.hamcrest.core") <T> `  
---  
` ` **[ anyOf
](../../../org/hamcrest/core/AnyOf.html#anyOf\(org.hamcrest.Matcher,
org.hamcrest.Matcher\)) ** ( [ Matcher ](../../../org/hamcrest/Matcher.html
"interface in org.hamcrest") <T> first, [ Matcher
](../../../org/hamcrest/Matcher.html "interface in org.hamcrest") <? super T>
second) `  
Creates a matcher that matches if the examined object matches **ANY** of the
specified matchers.  
` static  |  ` <T> [ AnyOf ](../../../org/hamcrest/core/AnyOf.html "class in org.hamcrest.core") <T> `  
---  
` ` **[ anyOf
](../../../org/hamcrest/core/AnyOf.html#anyOf\(org.hamcrest.Matcher,
org.hamcrest.Matcher, org.hamcrest.Matcher\)) ** ( [ Matcher
](../../../org/hamcrest/Matcher.html "interface in org.hamcrest") <T> first, [
Matcher ](../../../org/hamcrest/Matcher.html "interface in org.hamcrest") <?
super T> second, [ Matcher ](../../../org/hamcrest/Matcher.html "interface in
org.hamcrest") <? super T> third) `  
Creates a matcher that matches if the examined object matches **ANY** of the
specified matchers.  
` static  |  ` <T> [ AnyOf ](../../../org/hamcrest/core/AnyOf.html "class