public static <K> Matcher<Iterable<K>> containedIn(final Iterable<? super K> comparison) {
        return new IsIterableContained(comparison);
    }
public static < K > Matcher < Iterable < K > > containedIn ( final Iterable < ? super K > comparison ) { return new IsIterableContained ( comparison ) ; }
Creates a matcher for {@link Iterable}s matching when the examined {@linkplain Iterable} has all
the elements in the comparison {@linkplain Iterable}, without repetitions.
For instance:
{@code
List<String> comparison = Arrays.asList("bar", "bar", "foo");
List<String> given = Arrays.asList("bar", "bar", "bar");
assertThat(given, is(containedIn(comparison));
}
returns {@code false} because element {@code bar} in {@code given} is not counted 3 times in {@code comparison}.
While:
{@code
List<String> comparison = Arrays.asList("bar", "bar", "bar", "foo");
List<String> given = Arrays.asList("bar", "bar", "bar");
assertThat(given, is(containedIn(comparison));
}
returns {@code true} because all the elements in {@code given} are found in {@code comparison} with the same
frequency.