Safely
](../../../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\))
`  
**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**  
---  
  
###  IsArrayWithSize

    
    
    public **IsArrayWithSize**([Matcher](../../../org/hamcrest/Matcher.html "interface in org.hamcrest")<? super java.lang.Integer> sizeMatcher)

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

    
    
    protected java.lang.Integer **featureValueOf**([E](../../../org/hamcrest/collection/IsArrayWithSize.html "type parameter in IsArrayWithSize")[] 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") < [ E ](../../../org/hamcrest/collection/IsArrayWithSize.html
"type parameter in IsArrayWithSize") [],java.lang.Integer> `

    

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

* * *

###  arrayWithSize

    
    
    public static <E> [Matcher](../../../org/hamcrest/Matcher.html "interface in org.hamcrest")<E[]> **arrayWithSize**([Matcher](../../../org/hamcrest/Matcher.html "interface in org.hamcrest")<? super java.lang.Integer> sizeMatcher)

     Creates a matcher for arrays that matches when the ` length ` of the array satisfies the specified matcher. 

For example:

    
    
    assertThat(new String[]{"foo", "bar"}, arrayWithSize(equalTo(2)))

    

**Parameters:**      ` sizeMatcher ` \- a matcher for the length of an
examined array

* * *

###  arrayWithSize

    
    
    public static <E> [Matcher](../../../org/hamcrest/Matcher.html "interface in org.hamcrest")<E[]> **arrayWithSize**(int size)

     Creates a matcher for arrays that matches when the ` length ` of the array equals the specified ` size ` . 

For example:

    
    
    assertThat(new String[]{"foo", "bar"}, arrayWithSize(2))

    

**Parameters:**      ` size ` \- the length that an examined array must have
for a positive match

* * *

###  emptyArray

    
    
    public static <E> [Matcher](../../../org/hamcrest/Matcher.html "interface in org.hamcrest")<E[]> **emptyArray**()

     Creates a matcher for arrays that matches when the ` length ` of the array is zero. 

For example:

    
    
    assertThat(new String[0], emptyArray())

    

* * *

|  [ **Overview** ](../../../overview-summary.html) |  [ **Package** ](package-summary.html) |  **Class** |  [ **Use** ](class-use/IsArrayWithSize.html) |  [ **Tree** ](package-tree.html) |  [ **Deprecated** ](../../../deprecated-list.html) |  [ **Index** ](../../../index-all.html) |  [ **Help** ](../../../help-doc.html)  
---|---|---|---|---|---|---|---  
__  
[ **PREV CLASS** ](../../../org/hamcrest/collection/IsArrayContainingInOrder.html "class in org.hamcrest.collection") [ **NEXT CLASS** ](../../../org/hamcrest/collection/IsCollectionWithSize.ht