F - Type of value Enabled Switch holdspublic static class FeatureToggle.Enabled<F> extends java.lang.Object implements FeatureToggle<F>
Switch<Data> data = Switch.enabled(data); data.map(this::load); //data will be loaded because Switch is of type Enabled
FeatureToggle.Disabled<F>, FeatureToggle.Enabled<F>Applicativable.Applicatives, Applicativable.SemigroupApplyer<T>Value.ValueImpl<T>Convertable.SupplierToConvertable<T>| Modifier and Type | Method and Description |
|---|---|
AnyMValue<F> |
anyM() |
AnyMValue<F> |
anyMDisabled() |
AnyMValue<F> |
anyMEnabled() |
static <F> AnyM<F> |
anyMOf(F f)
Create a new enabled switch
|
boolean |
equals(java.lang.Object obj) |
F |
get() |
int |
hashCode() |
boolean |
isDisabled() |
boolean |
isEnabled() |
static <F> FeatureToggle.Enabled<F> |
of(F f)
Create a new enabled switch
|
java.lang.String |
toString() |
<R> R |
visit(java.util.function.Function<? super F,? extends R> enabled,
java.util.function.Function<? super F,? extends R> disabled) |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitcast, disable, disable, enable, enable, filter, filterNot, flatMap, flip, forEach, from, iterator, map, narrow, notNull, ofType, optional, patternMatch, peek, stream, toFeatureToggle, trampoline, unitcoflatMap, isPresent, nestap, ap, ap1, ap2, ap3, ap4, ap5fold, fold, generate, iterate, mapReduce, mkString, newSubscriber, subscribe, test, toDequeX, toEvalAlways, toEvalLater, toEvalNow, toFutureStream, toFutureStream, toIor, toLazyImmutable, toListX, toMaybe, toMutable, toPBagX, toPOrderedSetX, toPQueueX, toPSetX, toPStackX, toPVectorX, toQueueX, toSetX, toSimpleReact, toSimpleReact, toSortedSetX, toTry, toTry, toTry, toXor, toXor, unapply, visitendsWith, endsWithIterable, findAny, findFirst, firstValue, foldable, foldRight, foldRight, foldRight, foldRightMapToType, get, groupBy, headAndTail, 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, visit, visit, xMatchfromSupplier, orElse, orElseGet, orElseThrow, toAtomicReference, toCompletableFuture, toCompletableFutureAsync, toCompletableFutureAsync, toFutureW, toList, toOptional, toOptionalAtomicReference, toStreamtoOptional, visitmatchespublic AnyMValue<F> anyM()
anyM in interface FeatureToggle<F>anyM in interface MonadicValue<F>public AnyMValue<F> anyMDisabled()
anyMDisabled in interface FeatureToggle<F>public AnyMValue<F> anyMEnabled()
anyMEnabled in interface FeatureToggle<F>public static <F> FeatureToggle.Enabled<F> of(F f)
public static <F> AnyM<F> anyMOf(F f)
f - switch valuepublic F get()
get in interface FeatureToggle<F>get in interface Convertable<F>get in interface java.util.function.Supplier<F>public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic final boolean isEnabled()
isEnabled in interface FeatureToggle<F>public final boolean isDisabled()
isDisabled in interface FeatureToggle<F>public <R> R visit(java.util.function.Function<? super F,? extends R> enabled, java.util.function.Function<? super F,? extends R> disabled)
visit in interface FeatureToggle<F>