* * *

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

##  org.hamcrest.core  
Class DescribedAs<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.DescribedAs <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 **DescribedAs <T>**extends [BaseMatcher](../../../org/hamcrest/BaseMatcher.html "class in org.hamcrest")<T>

Provides a custom description to another matcher.

* * *

**Constructor Summary**  
---  
` **[ DescribedAs
](../../../org/hamcrest/core/DescribedAs.html#DescribedAs\(java.lang.String,
org.hamcrest.Matcher, java.lang.Object\[\]\)) ** (java.lang.String
descriptionTemplate, [ Matcher ](../../../org/hamcrest/Matcher.html "interface
in org.hamcrest") < [ T ](../../../org/hamcrest/core/DescribedAs.html "type
parameter in DescribedAs") > matcher, java.lang.Object[] values) `  
  
**Method Summary**  
---  
` static  |  ` <T> [ Matcher ](../../../org/hamcrest/Matcher.html "interface in org.hamcrest") <T> `  
---  
` ` **[ describedAs
](../../../org/hamcrest/core/DescribedAs.html#describedAs\(java.lang.String,
org.hamcrest.Matcher, java.lang.Object...\)) ** (java.lang.String description,
[ Matcher ](../../../org/hamcrest/Matcher.html "interface in org.hamcrest")
<T> matcher, java.lang.Object... values) `  
Wraps an existing matcher, overriding its description with that specified.  
` void ` |  ` **[ describeMismatch ](../../../org/hamcrest/core/DescribedAs.html#describeMismatch\(java.lang.Object, org.hamcrest.Description\)) ** (java.lang.Object item, [ Description ](../../../org/hamcrest/Description.html "interface in org.hamcrest") description) `   
Generate a description of why the matcher has not accepted the item.  
` void ` |  ` **[ describeTo ](../../../org/hamcrest/core/DescribedAs.html#describeTo\(org.hamcrest.Description\)) ** ( [ Description ](../../../org/hamcrest/Description.html "interface in org.hamcrest") description) `   
Generates a description of the object.  
` boolean ` |  ` **[ matches ](../../../org/hamcrest/core/DescribedAs.html#matches\(java.lang.Object\)) ** (java.lang.Object o) `   
Evaluates the matcher for argument  item  .  
**Methods inherited from class org.hamcrest.[ BaseMatcher
](../../../org/hamcrest/BaseMatcher.html "class in org.hamcrest") **  
---  
` [ _dont_implement_Matcher___instead_extend_BaseMatcher_
](../../../org/hamcrest/BaseMatcher.html#_dont_implement_Matcher___instead_extend_BaseMatcher_\(\))
, [ toString ](../../../org/hamcrest/BaseMatcher.html#toString\(\)) `  
**Methods inherited from class java.lang.Object**  
---  
` clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait,
wait `  
  
**Constructor Detail**  
---  
  
###  DescribedAs

    
    
    public **DescribedAs**(java.lang.String descriptionTemplate,
                       [Matcher](../../../org/hamcrest/Matcher.html