* * *

|  [ **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   
  
* * *

##  org.hamcrest.object  
Class HasToString<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.TypeSafeDiagnosingMatcher](../../../org/hamcrest/TypeSafeDiagnosingMatcher.html "class in org.hamcrest")<T>
              ![extended by ](../../../resources/inherit.gif)[org.hamcrest.FeatureMatcher](../../../org/hamcrest/FeatureMatcher.html "class in org.hamcrest")<T,java.lang.String>
                  ![extended by ](../../../resources/inherit.gif)**org.hamcrest.object.HasToString <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 **HasToString <T>**extends [FeatureMatcher](../../../org/hamcrest/FeatureMatcher.html "class in org.hamcrest")<T,java.lang.String>

* * *

**Constructor Summary**  
---  
` **[ HasToString
](../../../org/hamcrest/object/HasToString.html#HasToString\(org.hamcrest.Matcher\))
** ( [ Matcher ](../../../org/hamcrest/Matcher.html "interface in
org.hamcrest") <? super java.lang.String> toStringMatcher) `  
  
**Method Summary**  
---  
` protected java.lang.String ` |  ` **[ featureValueOf ](../../../org/hamcrest/object/HasToString.html#featureValueOf\(T\)) ** ( [ T ](../../../org/hamcrest/object/HasToString.html "type parameter in HasToString") actual) `   
Implement this to extract the interesting feature.  
` static  |  ` <T> [ Matcher ](../../../org/hamcrest/Matcher.html "interface in org.hamcrest") <T> `  
---  
` ` **[ hasToString
](../../../org/hamcrest/object/HasToString.html#hasToString\(org.hamcrest.Matcher\))
** ( [ 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.  
` static  |  ` <T> [ Matcher ](../../../org/hamcrest/Matcher.html "interface in org.hamcrest") <T> `  
---  
` ` **[ hasToString
](../../../org/hamcrest/object/HasToString.html#hasToString\(java.lang.String\))
** (java.lang.String expectedToString) `  
Creates a matcher that matches any examined object whose ` toString ` method
returns a value equalTo the specified string.  
**Methods inherited from class org.hamcrest.[ FeatureMatcher
](../../../org/hamcrest/FeatureMatcher.html "class in org.hamcrest") **  
---  
` [ describeTo
](../../../org/hamcrest/FeatureMatcher.html#describeTo\(org.hamcrest.Description\))
, [ matchesSafely
](../../../org/hamcrest/FeatureMatcher.html#matchesSafely\(T,
org.hamcrest.Description\)) `  
**Methods inherited from class org.hamcrest.[ TypeSafeDiagnosingMatcher
](../../../org/hamcrest/TypeSafeDiagnosingMatcher.html "class in
org.hamcrest") **  
---  
` [ describeMismatch
](../../../org/hamcrest/TypeSafeDiagnosingMatcher.html#describeMismatch\(java.lang.Object,
org.hamcrest.Description\)) , [ matches
](../../../org/hamcrest/TypeSafeDiagnosingMatcher.html#matches\(java.lang.Object\))
`