F
- Type of value Enabled Switch holdspublic static class FeatureToggle.Disabled<F> extends java.lang.Object implements FeatureToggle<F>
Switch<Data> data = Switch.disabled(data); data.map(this::load); //data will NOT be loaded because Switch is of type Disabled
FeatureToggle.Disabled<F>, FeatureToggle.Enabled<F>
Applicativable.Applicatives, Applicativable.SemigroupApplyer<T>
Value.ValueImpl<T>
Matchable.AsMatchable, Matchable.AutoCloseableMatchableIterable<TYPE>, Matchable.CheckValue1<T,R>, Matchable.CheckValue2<T1,T2,R>, Matchable.CheckValue3<T1,T2,T3,R>, Matchable.CheckValue4<T1,T2,T3,T4,R>, Matchable.CheckValue5<T1,T2,T3,T4,T5,R>, Matchable.CheckValues<T,R>, Matchable.MatchableIterable<TYPE>, Matchable.MatchableTuple1<T1>, Matchable.MatchableTuple2<TYPE,T1 extends TYPE,T2 extends TYPE>, Matchable.MatchableTuple3<TYPE,T1 extends TYPE,T2 extends TYPE,T3 extends TYPE>, Matchable.MatchableTuple4<TYPE,T1 extends TYPE,T2 extends TYPE,T3 extends TYPE,T4 extends TYPE>, Matchable.MatchableTuple5<TYPE,T1 extends TYPE,T2 extends TYPE,T3 extends TYPE,T4 extends TYPE,T5 extends TYPE>, Matchable.MatchSelf<TYPE>, Matchable.MTuple1<T1>, Matchable.MTuple2<T1,T2>, Matchable.MTuple3<T1,T2,T3>, Matchable.MTuple4<T1,T2,T3,T4>, Matchable.MTuple5<T1,T2,T3,T4,T5>
Convertable.SupplierToConvertable<T>
Modifier and Type | Method and Description |
---|---|
AnyM<F> |
anyM() |
AnyM<F> |
anyMDisabled() |
AnyM<F> |
anyMEnabled() |
static <F> AnyM<F> |
anyMOf(F f)
Create a new disabled switch
|
boolean |
equals(java.lang.Object obj) |
F |
get() |
int |
hashCode() |
boolean |
isDisabled() |
boolean |
isEnabled() |
static <F> FeatureToggle.Disabled<F> |
of(F f)
Create a new disabled 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
disable, disable, enable, enable, filter, flatMap, flatten, flip, forEach, from, iterator, map, optional, patternMatch, peek, stream, unapply, unit
ap, ap, ap1, ap2, ap3, ap4, ap5
convertTo, convertToAsync, fold, fold, generate, iterate, mkString, toDequeX, toEvalAlways, toEvalLater, toEvalNow, toFutureStream, toFutureStream, toIor, toIorSecondary, toLazyImmutable, toListX, toMaybe, toMutable, toPBagX, toPOrderedSetX, toPQueueX, toPSetX, toPStackX, toPVectorX, toQueueX, toSetX, toSimpleReact, toSimpleReact, toSortedSetX, toTry, toTry, toXor, toXorSecondary
foldRight, foldRight, foldRightMapToType, join, join, join, mapReduce, print, print, printErr, printOut, reduce, reduce, reduce, reduce, reduce, reduce
from, from, from, from, from, from, from, from, from, from, fromCharSequence, fromIterable, fromOptional, fromValue, listOfValues, matches, mayMatch, ofDecomposable, ofIterable, otherwise, otherwise, then, then, when, when, when, when, when, when, when, when, when, when, when, when, when, when, when, whenGuard
fromSupplier, orElse, orElseGet, orElseThrow, toAtomicReference, toCompletableFuture, toCompletableFutureAsync, toCompletableFutureAsync, toFutureW, toList, toOptional, toOptionalAtomicReference, toStream, visit
cast, trampoline
public AnyM<F> anyM()
anyM
in interface FeatureToggle<F>
public AnyM<F> anyMDisabled()
anyMDisabled
in interface FeatureToggle<F>
public AnyM<F> anyMEnabled()
anyMEnabled
in interface FeatureToggle<F>
public static <F> FeatureToggle.Disabled<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>