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, wait
cast, disable, disable, enable, enable, filter, filterNot, flatMap, flip, forEach, from, iterator, map, narrow, notNull, ofType, optional, patternMatch, peek, stream, toFeatureToggle, trampoline, unit
coflatMap, isPresent, nest
ap, ap, ap1, ap2, ap3, ap4, ap5
fold, 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, visit
endsWith, 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, xMatch
fromSupplier, orElse, orElseGet, orElseThrow, toAtomicReference, toCompletableFuture, toCompletableFutureAsync, toCompletableFutureAsync, toFutureW, toList, toOptional, toOptionalAtomicReference, toStream
toOptional, visit
matches
public 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.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public 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>