MCPcopy Create free account
hub / github.com/tomaszpolanski/Options / match

Method match

options/core/src/main/java/polanski/option/Option.java:178–180  ·  view source on GitHub ↗

Matches current optional to Some or None and returns appropriate value @param fSome Function that will be called if value exists @param fNone Function that will be called if value does not exist @param Result type @return Value returned by either @fSome of @fNone

(@NotNull final Func1<T, OUT> fSome,
                                    @NotNull final Func0<OUT> fNone)

Source from the content-addressed store, hash-verified

176 * @return Value returned by either @fSome of @fNone
177 */
178 @NotNull
179 public abstract <OUT> OUT match(@NotNull final Func1<T, OUT> fSome,
180 @NotNull final Func0<OUT> fNone);
181
182 /**
183 * Matches current option to Some or None and returns unit

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected