Class CollectionSizeMatcher<T extends java.lang.Iterable<?>>

    • Field Detail

      • size

        private final int size
        The expected size of the matched collection.
    • Constructor Detail

      • CollectionSizeMatcher

        public CollectionSizeMatcher​(int size)
        Creates a new matcher that matches the size of a matched collection.
        Parameters:
        size - The expected size of the matched collection.
    • Method Detail

      • matches

        public boolean matches​(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.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object