public static final class MaybeType.Box<T> extends java.lang.Object implements MaybeType<T>
MaybeType.µ, MaybeType.Box<T>
com.aol.cyclops.control.Maybe.Just<T>, com.aol.cyclops.control.Maybe.Lazy<T>, com.aol.cyclops.control.Maybe.Nothing<T>
com.aol.cyclops.types.applicative.ApplicativeFunctor.Applicatives, com.aol.cyclops.types.applicative.ApplicativeFunctor.ApplyFunctions<T>
Constructor and Description |
---|
Box() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
com.aol.cyclops.control.Maybe<T> |
filter(java.util.function.Predicate<? super T> fn) |
<R> com.aol.cyclops.control.Maybe<R> |
flatMap(java.util.function.Function<? super T,? extends com.aol.cyclops.types.MonadicValue<? extends R>> mapper) |
T |
get() |
int |
hashCode() |
boolean |
isPresent() |
<R> com.aol.cyclops.control.Maybe<R> |
map(java.util.function.Function<? super T,? extends R> mapper) |
com.aol.cyclops.control.Maybe<T> |
narrow() |
com.aol.cyclops.control.Maybe<T> |
recover(java.util.function.Supplier<T> value) |
com.aol.cyclops.control.Maybe<T> |
recover(T value) |
java.lang.String |
toString() |
<R> R |
visit(java.util.function.Function<? super T,? extends R> some,
java.util.function.Supplier<? extends R> none) |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
fromOptional, fromXor, fromXor, just, narrow, narrowK, narrowOptional, none, of, ofNullable, widen, widen, widen2
accumulateJust, accumulateJust, accumulateJust, cast, coflatMap, combine, combine, combineEager, filterNot, flatMapIterable, flatMapPublisher, fromEval, fromEvalOf, fromIterable, fromOptional, fromPublisher, narrow, nest, notNull, ofType, patternMatch, peek, sequence, sequence, sequenceJust, toMaybe, trampoline, unit, zip, zip, zip, zip, zip, zip, zip
applyFunctions
collect, fold, fold, generate, iterate, iterator, mapReduce, mkString, newSubscriber, stream, subscribe, test, toDequeX, toEvalAlways, toEvalLater, toEvalNow, toFeatureToggle, toFutureStream, toFutureStream, toIor, toLazyImmutable, toList, toListX, toMutable, toPBagX, toPOrderedSetX, toPQueueX, toPSetX, toPStackX, toPVectorX, toQueueX, toSetX, toSimpleReact, toSimpleReact, toSortedSetX, toTry, toTry, toTry, toXor, toXor, unapply
endsWith, endsWithIterable, findAny, findFirst, firstValue, foldable, foldRight, foldRight, foldRight, foldRightMapToType, get, groupBy, join, join, join, mapReduce, print, print, printErr, printOut, reduce, reduce, reduce, reduce, reduce, reduce, reduce, schedule, scheduleFixedDelay, scheduleFixedRate, single, single, singleOptional, startsWith, startsWithIterable, toConcurrentLazyCollection, toConcurrentLazyStreamable, toLazyCollection, validate, xMatch
collect, fromSupplier, orElse, orElseGet, orElseThrow, toAtomicReference, toCompletableFuture, toCompletableFutureAsync, toCompletableFutureAsync, toFutureW, toFutureWAsync, toFutureWAsync, toOptional, toOptionalAtomicReference, toStream
public com.aol.cyclops.control.Maybe<T> narrow()
public T get()
public boolean isPresent()
public com.aol.cyclops.control.Maybe<T> recover(java.util.function.Supplier<T> value)
recover
in interface com.aol.cyclops.control.Maybe<T>
public com.aol.cyclops.control.Maybe<T> recover(T value)
recover
in interface com.aol.cyclops.control.Maybe<T>
public <R> com.aol.cyclops.control.Maybe<R> map(java.util.function.Function<? super T,? extends R> mapper)
map
in interface com.aol.cyclops.control.Maybe<T>
map
in interface com.aol.cyclops.types.ConvertableFunctor<T>
map
in interface com.aol.cyclops.types.Functor<T>
map
in interface com.aol.cyclops.types.MonadicValue<T>
map
in interface com.aol.cyclops.types.MonadicValue1<T>
public <R> com.aol.cyclops.control.Maybe<R> flatMap(java.util.function.Function<? super T,? extends com.aol.cyclops.types.MonadicValue<? extends R>> mapper)
public <R> R visit(java.util.function.Function<? super T,? extends R> some, java.util.function.Supplier<? extends R> none)
visit
in interface com.aol.cyclops.control.Matchable.MatchableOptional<T>
visit
in interface com.aol.cyclops.control.Matchable.ValueAndOptionalMatcher<T>
visit
in interface com.aol.cyclops.control.Maybe<T>
visit
in interface com.aol.cyclops.types.Convertable<T>
visit
in interface com.aol.cyclops.types.Visitable<T>
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object