Subscribe to Switch event
Token of subscription
Set whether Switchable is locked or not. When locked, Switchable.setOn() is disabled.
State as boolean flag
state
Set state of switchable object.
NOTE: If Switchable.getLocked() == true, this method will not do anything.!
Object itself for fluent interface
State as boolean flag
Interface for object that can be switched on/off and that can have respective event-subscriptions