Package org.apache.sling.hamcrest.matchers

## Class ResourceChildrenMatcher

- java.lang.Object
- - org.hamcrest.BaseMatcher<T>
  - - org.hamcrest.TypeSafeMatcher<org.apache.sling.api.resource.Resource>
    - - org.apache.sling.hamcrest.matchers.ResourceChildrenMatcher

All Implemented Interfaces:
  `org.hamcrest.Matcher<org.apache.sling.api.resource.Resource>`, `org.hamcrest.SelfDescribing`

    public class ResourceChildrenMatcher
    extends org.hamcrest.TypeSafeMatcher<org.apache.sling.api.resource.Resource>

A matcher which matches if the given resource has at least the child resources with the names given in the constructor. Optionally it can match only if the resource's children match exactly the given child names. Also you can validate the order in case of exact matching.

### Constructor Summary

Constructors
`ResourceChildrenMatcher​(List<String> childNames, boolean exactMatch, boolean validateOrder)`

### Method Summary

All Methods Instance Methods Concrete Methods
`protected void` `describeMismatchSafely​(org.apache.sling.api.resource.Resource item, org.hamcrest.Description mismatchDescription)`
`void` `describeTo​(org.hamcrest.Description description)`
`protected boolean` `matchesSafely​(org.apache.sling.api.resource.Resource item)`

### Methods inherited from class org.hamcrest.TypeSafeMatcher

`describeMismatch, matches`

### Methods inherited from class org.hamcrest.BaseMatcher

`_dont_implement_Matcher___instead_extend_BaseMatcher_, isNotNull, toString`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### ResourceChildrenMatcher

    public ResourceChildrenMatcher​(List<String> childNames,
                                   boolean exactMatch,
                                   boolean validateOrder)

### Method Detail

#### describeTo

    public void describeTo​(org.hamcrest.Description description)

#### matchesSafely

    protected boolean matchesSafely​(org.apache.sling.api.resource.Resource item)

Specified by:
  `matchesSafely` in class `org.hamcrest.TypeSafeMatcher<org.apache.sling.api.resource.Resource>`

#### describeMismatchSafely

    protected void describeMismatchSafely​(org.apache.sling.api.resource.Resource item,
                                          org.hamcrest.Description mismatchDescription)

Overrides:
  `describeMismatchSafely` in class `org.hamcrest.TypeSafeMatcher<org.apache.sling.api.resource.Resource>`