Interface SelectionOrder
- All Superinterfaces:
SelectionBase
A selection based on the filtering of victims.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanWhether this punishment selection is equal to another, i.e. if the other selection would match the same punishments in all circumstances.default space.arim.omnibus.util.concurrent.ReactionStage<List<Punishment>> Gets all punishments matching this selection.default space.arim.omnibus.util.concurrent.ReactionStage<Optional<Punishment>> Gets the first punishment matching this selection.Gets the operators matchedGets the scopes matchedgetTypes()Gets the punishment types matchedGets the victims matchedGets the victim types matchedintGets the amount of punishments to retrieve.longGets the minimum ID after which punishments will be selected.Gets the minimum start time after which punishments will be selected.booleanWhether this selection will match only active, non-expired punishments.intGets the initial amount of punishments skipped.Methods inherited from interface SelectionBase
countNumberOfPunishments, getAllSpecificPunishments, getEscalationTracks, getFirstSpecificPunishment, seekBeforeId, seekBeforeStartTime
-
Method Details
-
getVictims
-
getVictimTypes
SelectionPredicate<Victim.VictimType> getVictimTypes()Gets the victim types matched- Returns:
- the victim types
-
getTypes
SelectionPredicate<PunishmentType> getTypes()Description copied from interface:SelectionBaseGets the punishment types matched- Specified by:
getTypesin interfaceSelectionBase- Returns:
- the punishment types
-
getOperators
SelectionPredicate<Operator> getOperators()Description copied from interface:SelectionBaseGets the operators matched- Specified by:
getOperatorsin interfaceSelectionBase- Returns:
- the operators
-
getScopes
SelectionPredicate<ServerScope> getScopes()Description copied from interface:SelectionBaseGets the scopes matched- Specified by:
getScopesin interfaceSelectionBase- Returns:
- the scopes
-
selectActiveOnly
boolean selectActiveOnly()Description copied from interface:SelectionBaseWhether this selection will match only active, non-expired punishments. Iffalse, then this selection may match any punishments, including undone or expired punishments.- Specified by:
selectActiveOnlyin interfaceSelectionBase- Returns:
- true to select only active and non-expired punishments, false to select all punishments
-
skipCount
int skipCount()Description copied from interface:SelectionBase- Specified by:
skipCountin interfaceSelectionBase- Returns:
- the amount of punishments skipped
-
limitToRetrieve
int limitToRetrieve()Description copied from interface:SelectionBase- Specified by:
limitToRetrievein interfaceSelectionBase- Returns:
- the amount to retrieve, or
0for unlimited
-
seekAfterStartTime
Instant seekAfterStartTime()Description copied from interface:SelectionBaseGets the minimum start time after which punishments will be selected.
SeeSelectionBuilderBase.seekAfter(Instant, long)- Specified by:
seekAfterStartTimein interfaceSelectionBase- Returns:
- the minimum start time, or
Instant.EPOCHfor none
-
seekAfterId
long seekAfterId()Description copied from interface:SelectionBaseGets the minimum ID after which punishments will be selected.
SeeSelectionBuilderBase.seekAfter(Instant, long)- Specified by:
seekAfterIdin interfaceSelectionBase- Returns:
- the minimum ID, which is meaningless if
SelectionBase.seekAfterStartTime()isInstant.EPOCH
-
getFirstSpecificPunishment
default space.arim.omnibus.util.concurrent.ReactionStage<Optional<Punishment>> getFirstSpecificPunishment()Description copied from interface:SelectionBaseGets the first punishment matching this selection.
If multiple punishments exist, the one chosen depends on the date enacted. The latest punishment will come first.- Specified by:
getFirstSpecificPunishmentin interfaceSelectionBase- Returns:
- a future which yields the first punishment matching this selection, or an empty optional if none matched
-
getAllSpecificPunishments
default space.arim.omnibus.util.concurrent.ReactionStage<List<Punishment>> getAllSpecificPunishments()Description copied from interface:SelectionBaseGets all punishments matching this selection.
The returned list is ordered by the date the punishment was enacted. The latest punishments come first.- Specified by:
getAllSpecificPunishmentsin interfaceSelectionBase- Returns:
- a future which yields all punishments matching this selection, or an empty set if none matched
-
equals
Description copied from interface:SelectionBaseWhether this punishment selection is equal to another, i.e. if the other selection would match the same punishments in all circumstances.- Specified by:
equalsin interfaceSelectionBase- Overrides:
equalsin classObject- Parameters:
object- the other object- Returns:
- true if the objects are equal, false otherwise
-