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.CheckValueOpt<T,R>, Matchable.CheckValues<T,R>, Matchable.MatchableIterable<TYPE>, Matchable.MatchableObject<TYPE>, Matchable.MatchableOptional<T>, 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>, Matchable.MXor<T1,T2>, Matchable.ValueAndOptionalMatcher<T>
Convertable.SupplierToConvertable<T>
Modifier and Type | Method and Description |
---|---|
AnyMValue<F> |
anyM() |
AnyM<F> |
anyMDisabled() |
AnyM<F> |
anyMEnabled() |
static <F> AnyM<F> |
anyMOf(F f)
Create a new disabled switch
|
FeatureToggle.Enabled<F> |
enable() |
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
cast, disable, disable, enable, filter, filterNot, flatMap, flip, forEach, from, iterator, map, notNull, ofType, optional, patternMatch, peek, stream, trampoline, unit
ap, ap, ap1, ap2, ap3, ap4, ap5
convertTo, convertToAsync, fold, fold, generate, getMatchable, 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, toXor, unapply
foldRight, foldRight, foldRight, foldRightMapToType, join, join, join, mapReduce, print, print, printErr, printOut, reduce, reduce, reduce, reduce, reduce, reduce, reduce
from, from, from, from, from, from, from, from, from, from, fromCharSequence, fromIterable, fromOptional, listOfValues, ofDecomposable, otherwise, otherwise, then, then, when, when, when, when, when, when, when, when, when, when, whenGuard, whenTrue, whenValues
fromSupplier, orElse, orElseGet, orElseThrow, toAtomicReference, toCompletableFuture, toCompletableFutureAsync, toCompletableFutureAsync, toFutureW, toList, toOptional, toOptionalAtomicReference, toStream, visit
toOptional, visit
matches
public FeatureToggle.Enabled<F> enable()
enable
in interface FeatureToggle<F>
public AnyMValue<F> anyM()
anyM
in interface FeatureToggle<F>
anyM
in interface MonadicValue<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>