Class CollectionElementMatcher<T>

    • Constructor Detail

      • CollectionElementMatcher

        public CollectionElementMatcher​(int index,
                                        ElementMatcher<? super T> matcher)
        Creates a new matcher for an element in a collection.
        Parameters:
        index - The index of the matched element.
        matcher - The matcher for the given element, if it exists.
    • Method Detail

      • matches

        public boolean matches​(Iterable<? extends T> target)
        Matches a target against this element matcher.
        Parameters:
        target - The instance to be matched.
        Returns:
        true if the given element is matched by this matcher or false otherwise.