**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**  
---  
  
###  HasToString

    
    
    public **HasToString**([Matcher](../../../org/hamcrest/Matcher.html "interface in org.hamcrest")<? super java.lang.String> toStringMatcher)

**Method Detail**  
---  
  
###  featureValueOf

    
    
    protected java.lang.String **featureValueOf**([T](../../../org/hamcrest/object/HasToString.html "type parameter in HasToString") actual)

     **Description copied from class:` [ FeatureMatcher ](../../../org/hamcrest/FeatureMatcher.html#featureValueOf\(T\)) ` **
     Implement this to extract the interesting feature. 

    

**Specified by:**      ` [ featureValueOf
](../../../org/hamcrest/FeatureMatcher.html#featureValueOf\(T\)) ` in class `
[ FeatureMatcher ](../../../org/hamcrest/FeatureMatcher.html "class in
org.hamcrest") < [ T ](../../../org/hamcrest/object/HasToString.html "type
parameter in HasToString") ,java.lang.String> `

    

**Parameters:**      ` actual ` \- the target object  **Returns:**      the
feature to be matched

* * *

###  hasToString

    
    
    public static <T> [Matcher](../../../org/hamcrest/Matcher.html "interface in org.hamcrest")<T> **hasToString**([Matcher](../../../org/hamcrest/Matcher.html "interface in org.hamcrest")<? super java.lang.String> toStringMatcher)

     Creates a matcher that matches any examined object whose ` toString ` method returns a value that satisfies the specified matcher. 

For example:

    
    
    assertThat(true, hasToString(equalTo("TRUE")))

    

**Parameters:**      ` toStringMatcher ` \- the matcher used to verify the
toString result

* * *

###  hasToString

    
    
    public static <T> [Matcher](../../../org/hamcrest/Matcher.html "interface in org.hamcrest")<T> **hasToString**(java.lang.String expectedToString)

     Creates a matcher that matches any examined object whose ` toString ` method returns a value equalTo the specified string. 

For example:

    
    
    assertThat(true, hasToString("TRUE"))

    

**Parameters:**      ` expectedToString ` \- the expected toString result

* * *

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