Package com.spotify.hamcrest.optional
Class OptionalMatchers
- java.lang.Object
-
- com.spotify.hamcrest.optional.OptionalMatchers
-
public final class OptionalMatchers extends java.lang.Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> org.hamcrest.Matcher<java.util.Optional<T>>emptyOptional()Creates a Matcher that matches empty Optionals.static org.hamcrest.Matcher<java.util.Optional<?>>optionalWithValue()Creates a Matcher that matches any Optional with a value.static <T> org.hamcrest.Matcher<java.util.Optional<? extends T>>optionalWithValue(org.hamcrest.Matcher<T> matcher)Creates a Matcher that matches an Optional with a value that matches the given Matcher.
-
-
-
Method Detail
-
emptyOptional
public static <T> org.hamcrest.Matcher<java.util.Optional<T>> emptyOptional()
Creates a Matcher that matches empty Optionals.
-
optionalWithValue
public static org.hamcrest.Matcher<java.util.Optional<?>> optionalWithValue()
Creates a Matcher that matches any Optional with a value.
-
optionalWithValue
public static <T> org.hamcrest.Matcher<java.util.Optional<? extends T>> optionalWithValue(org.hamcrest.Matcher<T> matcher)
Creates a Matcher that matches an Optional with a value that matches the given Matcher.
-
-