ely\(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**  
---  
  
###  IsIterableWithSize

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

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

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

    

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

* * *

###  iterableWithSize

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

     Creates a matcher for ` Iterable ` s that matches when a single pass over the examined ` Iterable ` yields an item count that satisfies the specified matcher. 

For example:

    
    
    assertThat(Arrays.asList("foo", "bar"), iterableWithSize(equalTo(2)))

    

**Parameters:**      ` sizeMatcher ` \- a matcher for the number of items that
should be yielded by an examined ` Iterable `

* * *

###  iterableWithSize

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

     Creates a matcher for ` Iterable ` s that matches when a single pass over the examined ` Iterable ` yields an item count that is equal to the specified ` size ` argument. 

For example:

    
    
    assertThat(Arrays.asList("foo", "bar"), iterableWithSize(2))

    

**Parameters:**      ` size ` \- the number of items that should be yielded by
an examined ` Iterable `

* * *

|  [ **Overview** ](../../../overview-summary.html) |  [ **Package** ](package-summary.html) |  **Class** |  [ **Use** ](class-use/IsIterableWithSize.html) |  [ **Tree** ](package-tree.html) |  [ **Deprecated** ](../../../deprecated-list.html) |  [ **Index** ](../../../index-all.html) |  [ **Help** ](../../../help-doc.html)  
---|---|---|---|---|---|---|---  
__  
[ **PREV CLASS** ](../../../org/hamcrest/collection/IsIterableContainingInOrder.html "class in org.hamcrest.collection") [ **NEXT CLASS** ](../../../org/hamcrest/collection/IsMapContaining.html "class in org.hamcrest.collection") |  [ **FRAMES** ](../../../index.html?org/hamcrest/collection/IsIterab