Interface HelpFilter<S extends CommandSource>
- Type Parameters:
S- the source type
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A functional interface for filtering help entries during query operations.
Filters are applied to
CommandPathways to determine which usages
should be included in help results.
Filters can be chained together to create complex filtering logic, such as permission checks, visibility rules, or category filtering.
-
Method Summary
Modifier and TypeMethodDescriptiondefault HelpFilter<S>and(HelpFilter<S> other) Creates a composite filter that requires both this and another filter to pass.booleanfilter(CommandPathway<S> pathway) Determines whether a pathway should be included in help results.default HelpFilter<S>negate()Creates a filter that inverts this filter's result.default HelpFilter<S>or(HelpFilter<S> other) Creates a composite filter that passes if either this or another filter passes.
-
Method Details
-
filter
Determines whether a pathway should be included in help results.- Parameters:
pathway- the command pathway to evaluate- Returns:
trueif the pathway passes the filter and should be included,falseif it should be excluded
-
and
Creates a composite filter that requires both this and another filter to pass.- Parameters:
other- the other filter to combine with- Returns:
- a new filter that passes only if both filters pass
-
or
Creates a composite filter that passes if either this or another filter passes.- Parameters:
other- the other filter to combine with- Returns:
- a new filter that passes if either filter passes
-
negate
Creates a filter that inverts this filter's result.- Returns:
- a new filter with inverted logic
-