Class DefaultToggle
Object
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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanAbilities that are ON (and have failed theAbilityToggle.isOff(org.telegram.telegrambots.abilitybots.api.objects.Ability)condition) will be processed by this method.
-
Constructor Details
-
DefaultToggle
public DefaultToggle()
-
-
Method Details
-
isOff
- Specified by:
isOffin interfaceAbilityToggle- Parameters:
ability- the target ability- Returns:
- true if the ability has been turned off
-
processAbility
Description copied from interface:AbilityToggleAbilities that are ON (and have failed theAbilityToggle.isOff(org.telegram.telegrambots.abilitybots.api.objects.Ability)condition) will be processed by this method.- Specified by:
processAbilityin interfaceAbilityToggle- Parameters:
ab- the target ability- Returns:
- the processed ability
-