Class Java8Matchers


  • public final class Java8Matchers
    extends Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <I,​O>
      org.hamcrest.Matcher<I>
      where​(DescribableFunction<? super I,​O> property, org.hamcrest.Matcher<? super O> matcher)
      Match a value/property derived from an object.
      static <I,​O>
      org.hamcrest.Matcher<I>
      where​(DescribablePredicate<? super I> booleanProperty)
      Match a boolean property of an object which should be true.
      static <I,​O>
      org.hamcrest.Matcher<I>
      where​(String propertyDescription, DescribableFunction<? super I,​O> property, org.hamcrest.Matcher<? super O> matcher)
      Match a value/property derived from an object.
      static <I,​O>
      org.hamcrest.Matcher<I>
      where​(String propertyDescription, DescribablePredicate<? super I> booleanProperty)
      Match a boolean property of an object which should be true.
      static <I,​O>
      org.hamcrest.Matcher<I>
      where​(String entityDescription, String propertyDescription, Function<? super I,​O> property, org.hamcrest.Matcher<? super O> matcher)
      Match a value/property derived from an object.
      static <I,​O>
      org.hamcrest.Matcher<I>
      whereNot​(DescribablePredicate<? super I> booleanProperty)
      Match a boolean property of an object which should be false.
      static <I,​O>
      org.hamcrest.Matcher<I>
      whereNot​(String propertyDescription, DescribablePredicate<? super I> booleanProperty)
      Match a boolean property of an object which should be false.
    • Method Detail

      • whereNot

        public static <I,​O> org.hamcrest.Matcher<I> whereNot​(DescribablePredicate<? super I> booleanProperty)
        Match a boolean property of an object which should be false.
        Parameters:
        booleanProperty - the predicate reolving the boolean property from the object.
      • whereNot

        public static <I,​O> org.hamcrest.Matcher<I> whereNot​(String propertyDescription,
                                                                   DescribablePredicate<? super I> booleanProperty)
        Match a boolean property of an object which should be false.
        Parameters:
        propertyDescription - a description of the property.
        booleanProperty - the predicate resolving the boolean property from the object.
      • where

        public static <I,​O> org.hamcrest.Matcher<I> where​(DescribablePredicate<? super I> booleanProperty)
        Match a boolean property of an object which should be true.
        Parameters:
        booleanProperty - the predicate resolving the boolean property from the object.
      • where

        public static <I,​O> org.hamcrest.Matcher<I> where​(String propertyDescription,
                                                                DescribablePredicate<? super I> booleanProperty)
        Match a boolean property of an object which should be true.
        Parameters:
        propertyDescription - a description of the property.
        booleanProperty - the predicate resolving the boolean property from the object.
      • where

        public static <I,​O> org.hamcrest.Matcher<I> where​(DescribableFunction<? super I,​O> property,
                                                                org.hamcrest.Matcher<? super O> matcher)
        Match a value/property derived from an object.
        Parameters:
        property - the function which resolves the derived value to match.
        matcher - the Matcher for the derived value.
      • where

        public static <I,​O> org.hamcrest.Matcher<I> where​(String propertyDescription,
                                                                DescribableFunction<? super I,​O> property,
                                                                org.hamcrest.Matcher<? super O> matcher)
        Match a value/property derived from an object.
        Parameters:
        propertyDescription - a description of the derived value.
        property - the function which resolves the derived value to match.
        matcher - the Matcher for the derived value.
      • where

        public static <I,​O> org.hamcrest.Matcher<I> where​(String entityDescription,
                                                                String propertyDescription,
                                                                Function<? super I,​O> property,
                                                                org.hamcrest.Matcher<? super O> matcher)
        Match a value/property derived from an object.
        Parameters:
        entityDescription - a description of the object the matched value is derived from.
        propertyDescription - a description of the derived value.
        property - the function which resolves the derived value to match.
        matcher - the Matcher for the derived value.