T
- Data type stored within the Evalpublic interface EvalType<T> extends com.aol.cyclops.hkt.alias.Higher<EvalType.µ,T>, com.aol.cyclops.control.Eval<T>
Modifier and Type | Interface and Description |
---|---|
static class |
EvalType.µ
Witness type
|
static class |
EvalType.Box<T> |
com.aol.cyclops.control.Eval.Module
com.aol.cyclops.types.applicative.ApplicativeFunctor.Applicatives, com.aol.cyclops.types.applicative.ApplicativeFunctor.ApplyFunctions<T>
Modifier and Type | Method and Description |
---|---|
static <T> EvalType<T> |
always(java.util.function.Supplier<T> value)
Lazily create an Eval from the specified Supplier.
|
static <T> EvalType<T> |
fromIterable(java.lang.Iterable<T> iterable)
Create an EvalType instance from an Iterable
|
static <T> EvalType<T> |
fromPublisher(org.reactivestreams.Publisher<T> pub)
Create an EvalType instance from a reactive-streams publisher
|
static <T> EvalType<T> |
later(java.util.function.Supplier<T> value)
Lazily create an Eval from the specified Supplier.
|
static <T> com.aol.cyclops.control.Eval<T> |
narrow(com.aol.cyclops.hkt.alias.Higher<EvalType.µ,T> eval)
Convert the HigherKindedType definition for a Eval into
|
static <T> EvalType<T> |
narrowK(com.aol.cyclops.hkt.alias.Higher<EvalType.µ,T> future)
Convert the raw Higher Kinded Type for MaybeType types into the MaybeType type definition class
|
static <T> EvalType<T> |
now(T value)
Create an Eval with the value specified
|
static <T> EvalType<T> |
widen(com.aol.cyclops.control.Eval<T> eval)
Convert a Eval to a simulated HigherKindedType that captures Eval nature
and Eval element data type separately.
|
accumulate, accumulate, accumulate, cast, coflatMap, combine, combine, combineEager, filter, filterNot, flatMap, flatMapIterable, flatMapPublisher, get, map, narrow, nest, notNull, ofType, peek, sequence, sequence, steps, trampoline, unit, visit, zip, zip, zip, zip, zip, zip, zip
applyFunctions
collect, fold, fold, generate, iterate, iterator, mapReduce, mkString, newSubscriber, of, stream, subscribe, test, toDequeX, toEvalAlways, toEvalLater, toEvalNow, toFeatureToggle, toFutureStream, toFutureStream, toIor, toLazyImmutable, toList, toListX, toMaybe, 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, isPresent, orElse, orElseGet, orElseThrow, toAtomicReference, toCompletableFuture, toCompletableFutureAsync, toCompletableFutureAsync, toFutureW, toFutureWAsync, toFutureWAsync, toOptional, toOptionalAtomicReference, toStream
static <T> EvalType<T> fromPublisher(org.reactivestreams.Publisher<T> pub)
EvalType<Integer> e = EvalType.fromPublisher(Mono.just(10));
//EvalType[10]
fromPublisher
in interface com.aol.cyclops.control.Eval<T>
pub
- Publisher to create the Eval fromstatic <T> EvalType<T> fromIterable(java.lang.Iterable<T> iterable)
EvalType<Integer> e = EvalType.fromIterable(Arrays.asList(10));
//EvalType[10]
fromIterable
in interface com.aol.cyclops.control.Eval<T>
iterable
- to create the Eval fromstatic <T> EvalType<T> now(T value)
EvalType<Integer> e = EvalType.now(10);
//Eval[10]
now
in interface com.aol.cyclops.control.Eval<T>
value
- of EvalTypestatic <T> EvalType<T> narrowK(com.aol.cyclops.hkt.alias.Higher<EvalType.µ,T> future)
future
- HKT encoded list into a OptionalTypestatic <T> EvalType<T> later(java.util.function.Supplier<T> value)
EvalType<Integer> e = EvalType.later(()->10)
.map(i->i*2);
//EvalType[20] - lazy so will not be executed until the value is accessed
later
in interface com.aol.cyclops.control.Eval<T>
value
- Supplier to (lazily) populate this Evalstatic <T> EvalType<T> always(java.util.function.Supplier<T> value)
EvalType<Integer> e = EvalType.always(()->10)
.map(i->i*2);
//EvalType[20] - lazy so will not be executed until the value is accessed
always
in interface com.aol.cyclops.control.Eval<T>
value
- Supplier to (lazily) populate this Evalstatic <T> EvalType<T> widen(com.aol.cyclops.control.Eval<T> eval)
Eval
- Eval to widen to a EvalTypestatic <T> com.aol.cyclops.control.Eval<T> narrow(com.aol.cyclops.hkt.alias.Higher<EvalType.µ,T> eval)
Eval
- Type Constructor to convert back into narrowed type