Package com.palantir.util
Class OptionalResolver
- java.lang.Object
-
- com.palantir.util.OptionalResolver
-
public final class OptionalResolver extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> T
resolve(Optional<T> optional1, Optional<T> optional2)
Returns a single value corresponding to the value that is present in one or more of the Optionals provided.
-
-
-
Method Detail
-
resolve
public static <T> T resolve(Optional<T> optional1, Optional<T> optional2)
Returns a single value corresponding to the value that is present in one or more of the Optionals provided. This method throws if no Optionals provided contain values, or if the Optionals provided contain multiple values that are not equal. Null Optionals are considered not-present.
-
-