* * *

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

##  org.hamcrest  
Class FeatureMatcher<T,U>

    
    
    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 <T,U>**
    

**Type Parameters:**      ` T ` \- The type of the object to be matched      `
U ` \- The type of the feature to be matched

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

**Direct Known Subclasses:**      [ HasToString
](../../org/hamcrest/object/HasToString.html "class in org.hamcrest.object") ,
[ IsArrayWithSize ](../../org/hamcrest/collection/IsArrayWithSize.html "class
in org.hamcrest.collection") , [ IsCollectionWithSize
](../../org/hamcrest/collection/IsCollectionWithSize.html "class in
org.hamcrest.collection") , [ IsIterableWithSize
](../../org/hamcrest/collection/IsIterableWithSize.html "class in
org.hamcrest.collection")

* * *
    
    
    public abstract class **FeatureMatcher <T,U>**extends [TypeSafeDiagnosingMatcher](../../org/hamcrest/TypeSafeDiagnosingMatcher.html "class in org.hamcrest")<T>

Supporting class for matching a feature of an object. Implement `
featureValueOf() ` in a subclass to pull out the feature to be matched
against.

* * *

**Constructor Summary**  
---  
` **[ FeatureMatcher
](../../org/hamcrest/FeatureMatcher.html#FeatureMatcher\(org.hamcrest.Matcher,
java.lang.String, java.lang.String\)) ** ( [ Matcher
](../../org/hamcrest/Matcher.html "interface in org.hamcrest") <? super [ U
](../../org/hamcrest/FeatureMatcher.html "type parameter in FeatureMatcher") >
subMatcher, java.lang.String featureDescription, java.lang.String featureName)
`  
Constructor  
**Method Summary**  
---  
` void ` |  ` **[ describeTo ](../../org/hamcrest/FeatureMatcher.html#describeTo\(org.hamcrest.Description\)) ** ( [ Description ](../../org/hamcrest/Description.html "interface in org.hamcrest") description) `   
Generates a description of the object.  
` protected abstract [ U ](../../org/hamcrest/FeatureMatcher.html "type parameter in FeatureMatcher") ` |  ` **[ featureValueOf ](../../org/hamcrest/FeatureMatcher.html#featureValueOf\(T\)) ** ( [ T ](../../org/hamcrest/FeatureMatcher.html "type parameter in FeatureMatcher") actual) `   
Implement this to extract the interesting feature.  
` protected boolean ` |  ` **[ matchesSafely ](../../org/hamcrest/FeatureMatcher.html#matchesSafely\(T, org.hamcrest.Description\)) ** ( [ T ](../../org/hamcrest/FeatureMatcher.html "type parameter in FeatureMatcher") actual, [ Description ](../../org/hamcrest/Description.html "interface in org.hamcrest") mismatch) `   
Subclasses should implement this.  
**Methods inherited from class org.hamcrest.[ TypeSafeDiagnosingMatcher
](../../org/hamcrest/TypeSafeDiagnosingMatcher.html "class in org.hamcrest")
**  
---  
` [ descr