Class IterableMatcher

java.lang.Object
org.dmfs.jems2.hamcrest.matchers.iterable.IterableMatcher

public final class IterableMatcher extends Object
Factory methods for Iterable matchers.
  • Method Summary

    Modifier and Type
    Method
    Description
    static <E> org.hamcrest.Matcher<Iterable<? extends E>>
    iteratesTo(E... items)
    Matcher that matches when the actual Iterable has equal to elements in same order as the provided items.
    static <E> org.hamcrest.Matcher<Iterable<? extends E>>
    iteratesTo(Iterable<? extends org.hamcrest.Matcher<? super E>> itemMatchers)
    Matcher that matches when the provided matchers match with the actual Iterables elements in the same order.
    static <E> org.hamcrest.Matcher<Iterable<? extends E>>
    iteratesTo(org.hamcrest.Matcher<? super E>... itemMatchers)
    Matcher that matches when the provided item matchers match the actual Iterables elements in the same order.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • iteratesTo

      public static <E> org.hamcrest.Matcher<Iterable<? extends E>> iteratesTo(Iterable<? extends org.hamcrest.Matcher<? super E>> itemMatchers)
      Matcher that matches when the provided matchers match with the actual Iterables elements in the same order.
    • iteratesTo

      @SafeVarargs public static <E> org.hamcrest.Matcher<Iterable<? extends E>> iteratesTo(E... items)
      Matcher that matches when the actual Iterable has equal to elements in same order as the provided items.
    • iteratesTo

      @SafeVarargs public static <E> org.hamcrest.Matcher<Iterable<? extends E>> iteratesTo(org.hamcrest.Matcher<? super E>... itemMatchers)
      Matcher that matches when the provided item matchers match the actual Iterables elements in the same order.