Class HelpQuery<S extends Source>
java.lang.Object
studio.mevera.imperat.command.tree.help.HelpQuery<S>
- Type Parameters:
S- The type ofSourcefrom which the command was executed.
An immutable data class representing a query for help documentation.
This class encapsulates the various parameters that can be used to filter and
limit help entries, such as maximum depth, a result limit, and a queue of
specific filters. It is designed to be constructed using its nested HelpQuery.Builder.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classHelpQuery.Builder<S extends Source>A builder class for creating instances ofHelpQuery. -
Method Summary
Modifier and TypeMethodDescriptionstatic <S extends Source>
HelpQuery.Builder<S>builder()Creates a new builder for constructing aHelpQuery.@NotNull Queue<HelpFilter<S>>Gets the queue of filters to apply to the help entries.intgetLimit()Gets the maximum number of help entries to return.intGets the maximum depth to traverse the command tree when searching for help entries.@NotNull Predicate<CommandUsage<S>>
-
Method Details
-
builder
Creates a new builder for constructing aHelpQuery.- Type Parameters:
S- The type ofSource.- Returns:
- A new builder instance.
-
getLimit
public int getLimit()Gets the maximum number of help entries to return.- Returns:
- The limit.
-
getMaxDepth
public int getMaxDepth()Gets the maximum depth to traverse the command tree when searching for help entries.- Returns:
- The maximum depth.
-
getFilters
Gets the queue of filters to apply to the help entries.- Returns:
- An unmodifiable queue of filters.
-
getRootUsagePredicate
- Returns:
- Fetches the condition for including the root's
CommandUsage
-