public class OptionalTSeqComprehender extends java.lang.Object implements Comprehender<OptionalTSeq>, Printable
| Constructor and Description |
|---|
OptionalTSeqComprehender() |
| Modifier and Type | Method and Description |
|---|---|
OptionalTSeq |
empty() |
java.lang.Object |
filter(OptionalTSeq t,
java.util.function.Predicate p)
Wrapper around filter
|
java.lang.Object |
flatMap(OptionalTSeq t,
java.util.function.Function fn) |
OptionalTSeq |
fromIterator(java.util.Iterator o) |
java.lang.Class |
getTargetClass() |
java.lang.Object |
map(OptionalTSeq t,
java.util.function.Function fn)
Wrapper around map
|
OptionalTSeq |
of(java.lang.Object o) |
java.lang.Object |
resolveForCrossTypeFlatMap(Comprehender comp,
OptionalTSeq apply)
Answers the question how should this type behave when returned in a flatMap function
by another type? For example - Optional uses comp.of(opt.get()) when a value is present
and comp.empty() when no value is present.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitexecuteflatMap, instanceOfT, liftAndFlatMap, liftObject, priority, unwrap, unwrapOtherMonadTypespublic java.lang.Object resolveForCrossTypeFlatMap(Comprehender comp, OptionalTSeq apply)
ComprehenderresolveForCrossTypeFlatMap in interface Comprehender<OptionalTSeq>public java.lang.Object filter(OptionalTSeq t, java.util.function.Predicate p)
Comprehenderfilter in interface Comprehender<OptionalTSeq>t - Monadic type being wrappedp - JDK Predicate to wrap t.filter ( i -> p.test(i)); public java.lang.Object map(OptionalTSeq t, java.util.function.Function fn)
Comprehendermap in interface Comprehender<OptionalTSeq>t - Monadic type being wrappedfn - JDK Function to wrap t.map( i -> fn.apply(i)); public java.lang.Object flatMap(OptionalTSeq t, java.util.function.Function fn)
flatMap in interface Comprehender<OptionalTSeq>public OptionalTSeq of(java.lang.Object o)
of in interface Comprehender<OptionalTSeq>public OptionalTSeq empty()
empty in interface Comprehender<OptionalTSeq>public java.lang.Class getTargetClass()
getTargetClass in interface Comprehender<OptionalTSeq>public OptionalTSeq fromIterator(java.util.Iterator o)
fromIterator in interface Comprehender<OptionalTSeq>