public class ReaderComprehender extends java.lang.Object implements Comprehender<Reader>
Constructor and Description |
---|
ReaderComprehender() |
Modifier and Type | Method and Description |
---|---|
Reader |
empty() |
java.lang.Object |
flatMap(Reader t,
java.util.function.Function fn) |
java.lang.Class |
getTargetClass() |
java.lang.Object |
map(Reader t,
java.util.function.Function fn)
Wrapper around map
|
Reader |
of(java.lang.Object o) |
java.lang.Object |
resolveForCrossTypeFlatMap(Comprehender comp,
Reader 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, wait
executeflatMap, filter, instanceOfT, liftAndFlatMap, liftObject, priority, unwrap, unwrapOtherMonadTypes
public java.lang.Object resolveForCrossTypeFlatMap(Comprehender comp, Reader apply)
Comprehender
resolveForCrossTypeFlatMap
in interface Comprehender<Reader>
public java.lang.Object map(Reader t, java.util.function.Function fn)
Comprehender
map
in interface Comprehender<Reader>
t
- Monadic type being wrappedfn
- JDK Function to wrap t.map( i -> fn.apply(i));
public java.lang.Object flatMap(Reader t, java.util.function.Function fn)
flatMap
in interface Comprehender<Reader>
public Reader of(java.lang.Object o)
of
in interface Comprehender<Reader>
public Reader empty()
empty
in interface Comprehender<Reader>
public java.lang.Class getTargetClass()
getTargetClass
in interface Comprehender<Reader>