abstract class Toggle extends (Int) ⇒ Boolean
Toggles are used for modifying behavior without changing code.
- Self Type
- Toggle
- See also
Feature Toggles for detailed discussion on the topic.
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- Toggle
- Function1
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- All
Instance Constructors
-
new
Toggle(id: String)
- id
the identifying name of the
Toggle. These should generally be fully qualified names to avoid conflicts between libraries. For example, "com.twitter.finagle.CoolThing". Valid characters areA-Z,a-z,0-9,_,-,..
Abstract Value Members
-
abstract
def
apply(v1: Int): Boolean
- Definition Classes
- Function1
-
abstract
def
isDefined: Boolean
Whether this toggle is backed by a concrete toggle that will decide whether it's enabled or not.
Whether this toggle is backed by a concrete toggle that will decide whether it's enabled or not. If this is false, then apply should always return false.
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
andThen[A](g: (Boolean) ⇒ A): (Int) ⇒ A
- Definition Classes
- Function1
- Annotations
- @unspecialized()
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
compose[A](g: (A) ⇒ Int): (A) ⇒ Boolean
- Definition Classes
- Function1
- Annotations
- @unspecialized()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isEnabled(t: Int): Boolean
Similar to
Function1.applybut has better java friendliness. -
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def isUndefined: Boolean
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
orElse(that: Toggle): Toggle
Similar to
PartialFunction.orElsebut specialized for Toggles. -
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- Function1 → AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()