* * *

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

##  org.hamcrest.core  
Class StringContains

    
    
    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.TypeSafeMatcher](../../../org/hamcrest/TypeSafeMatcher.html "class in org.hamcrest")<java.lang.String>
              ![extended by ](../../../resources/inherit.gif)[org.hamcrest.core.SubstringMatcher](../../../org/hamcrest/core/SubstringMatcher.html "class in org.hamcrest.core")
                  ![extended by ](../../../resources/inherit.gif)**org.hamcrest.core.StringContains**
    

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

* * *
    
    
    public class **StringContains** extends [SubstringMatcher](../../../org/hamcrest/core/SubstringMatcher.html "class in org.hamcrest.core")

Tests if the argument is a string that contains a substring.

* * *

**Field Summary**  
---  
**Fields inherited from class org.hamcrest.core.[ SubstringMatcher
](../../../org/hamcrest/core/SubstringMatcher.html "class in
org.hamcrest.core") **  
---  
` [ substring ](../../../org/hamcrest/core/SubstringMatcher.html#substring) `  
**Constructor Summary**  
---  
` **[ StringContains
](../../../org/hamcrest/core/StringContains.html#StringContains\(java.lang.String\))
** (java.lang.String substring) `  
  
**Method Summary**  
---  
` static [ Matcher ](../../../org/hamcrest/Matcher.html "interface in org.hamcrest") <java.lang.String> ` |  ` **[ containsString ](../../../org/hamcrest/core/StringContains.html#containsString\(java.lang.String\)) ** (java.lang.String substring) `   
Creates a matcher that matches if the examined ` String ` contains the
specified ` String ` anywhere.  
` protected boolean ` |  ` **[ evalSubstringOf ](../../../org/hamcrest/core/StringContains.html#evalSubstringOf\(java.lang.String\)) ** (java.lang.String s) `   
  
` protected java.lang.String ` |  ` **[ relationship ](../../../org/hamcrest/core/StringContains.html#relationship\(\)) ** () `   
  
**Methods inherited from class org.hamcrest.core.[ SubstringMatcher
](../../../org/hamcrest/core/SubstringMatcher.html "class in
org.hamcrest.core") **  
---  
` [ describeMismatchSafely
](../../../org/hamcrest/core/SubstringMatcher.html#describeMismatchSafely\(java.lang.String,
org.hamcrest.Description\)) , [ describeTo
](../../../org/hamcrest/core/SubstringMatcher.html#describeTo\(org.hamcrest.Description\))
, [ matchesSafely
](../../../org/hamcrest/core/SubstringMatcher.html#matchesSafely\(java.lang.String\))
`  
**Methods inherited from class org.hamcrest.[ TypeSafeMatcher
](../../../org/hamcrest/TypeSafeMatcher.html "class in org.hamcrest") **  
---  
` [ describeMismatch
](../../../org/hamcrest/TypeSafeMatcher.html#describeMismatch\(java.lang.Object,
org.hamcrest.Description\)) , [ matches
](../../../org/hamcrest/TypeSafeMatcher.html#matches\(java.lang.Object\)) `  
**Methods inherited from class