Interface CommandPriorityCalculator
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Calculate the priority of
CommandMessage based on its content.
Higher value means higher priority.
- Since:
- 4.0.0
- Author:
- Marc Gathier
-
Method Summary
Modifier and TypeMethodDescriptionstatic CommandPriorityCalculatorReturns a default implementation of theCommandPriorityCalculator, always returning priority0.intdeterminePriority(CommandMessage command) Determines the priority of the givencommand.
-
Method Details
-
determinePriority
Determines the priority of the givencommand. The higher the returned value, the higher the priority is.- Parameters:
command- ACommandMessageto prioritize.- Returns:
- An
intdefining the priority of the givencommand.
-
defaultCalculator
Returns a default implementation of theCommandPriorityCalculator, always returning priority0.- Returns:
- A lambda taking in a
CommandMessageto prioritize to the default of priority0.
-