Class DefaultToggle
java.lang.Object
org.telegram.abilitybots.api.toggle.DefaultToggle
- All Implemented Interfaces:
AbilityToggle
If the user does not supply a toggle to their constructor, the default toggle will be instantiated.
This default toggle allows all the default abilities to be registered.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Abilities that are ON (and have failed theAbilityToggle.isOff(org.telegram.abilitybots.api.objects.Ability)
condition) will be processed by this method.
-
Constructor Details
-
DefaultToggle
public DefaultToggle()
-
-
Method Details
-
isOff
- Specified by:
isOff
in interfaceAbilityToggle
- Parameters:
ability
- the target ability- Returns:
- true if the ability has been turned off
-
processAbility
Description copied from interface:AbilityToggle
Abilities that are ON (and have failed theAbilityToggle.isOff(org.telegram.abilitybots.api.objects.Ability)
condition) will be processed by this method.- Specified by:
processAbility
in interfaceAbilityToggle
- Parameters:
ab
- the target ability- Returns:
- the processed ability
-