Skip to content

Type Interfaces : Value

johnmcclean-aol edited this page Nov 23, 2016 · 2 revisions

The Value interface

A Value represents a non-scalar value (which may or may not be present now or resolved at some future date). Value extends Zippable, Convertable, Iterable, Reactive Streams Publisher

Value contains a large range of conversion methods to cyclops-react core types.

Value Methods

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

Foldable Methods

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

Convertable Methods

collect, fromSupplier, get, isPresent, orElse, orElseGet, orElseThrow, toAtomicReference, toCompletableFuture, toCompletableFutureAsync, toCompletableFutureAsync, toFutureW, toFutureWAsync, toFutureWAsync, toOptional, toOptionalAtomicReference, toStream, visit

Predicate Methods

and, isEqual, negate, or

Examples

Value<Integer> value = ()->10;
ListX<Integer> list = value.toListX();

ValueSubscriber<Integer> subscriber = ValueSubscriber.subscriber();
Maybe.just(10)
     .subscribe(subscriber);

subscriber.toXor()
          .printOut();

Implementations

CompletableFutureTValue, Eval.Module.Always, Eval.Module.Later, EvalTValue, FeatureToggle.Disabled, FeatureToggle.Enabled, FutureW, FutureWTValue, Ior.Both, Ior.Primary, Ior.Secondary, LazyImmutable, Maybe.Just, Maybe.Lazy, Maybe.Nothing, MaybeTValue, Mutable, MutableBoolean, MutableByte, MutableChar, MutableDouble, MutableFloat, MutableInt, MutableLong, MutableShort, OptionalTValue, Try.Failure, Try.Success, TryTValue, Value.ValueImpl, ValueSubscriber, Xor.Primary, Xor.Secondary, XorTValue

Clone this wiki locally