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 voidUpdates the internal delegate selection against theFeaturestate.static voidManually update the internal delegation of aTogglzSwitchableagainst itsFeaturestate.
-
Field Details
-
delegate
-
-
Constructor Details
-
TogglzSwitchable
-
-
Method Details
-
checkTogglzState
protected final void checkTogglzState()Updates the internal delegate selection against theFeaturestate. -
update
Manually update the internal delegation of aTogglzSwitchableagainst itsFeaturestate. This is intended for use with passive switching.- Parameters:
o- The object to update. If null or not aTogglzSwitchable, no action is taken.
-