Package org.togglz.core.proxy
Class TogglzSwitchable<T>
java.lang.Object
org.togglz.core.proxy.TogglzSwitchable<T>
Simple switch which sets its delegate to one of two objects depending on the state of the specified
Feature
.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionTogglzSwitchable
(FeatureManager featureManager, Feature feature, T active, T inactive) -
Method Summary
Modifier and TypeMethodDescriptionprotected final void
Updates the internal delegate selection against theFeature
state.static void
Manually update the internal delegation of aTogglzSwitchable
against itsFeature
state.
-
Field Details
-
delegate
-
-
Constructor Details
-
TogglzSwitchable
-
-
Method Details
-
checkTogglzState
protected final void checkTogglzState()Updates the internal delegate selection against theFeature
state. -
update
Manually update the internal delegation of aTogglzSwitchable
against itsFeature
state. This is intended for use with passive switching.- Parameters:
o
- The object to update. If null or not aTogglzSwitchable
, no action is taken.
-