Class HelpQuery<S extends Source>

java.lang.Object
studio.mevera.imperat.command.tree.help.HelpQuery<S>
Type Parameters:
S - The type of Source from which the command was executed.

public final class HelpQuery<S extends Source> extends Object
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.

  • Method Details

    • builder

      public static <S extends Source> HelpQuery.Builder<S> builder()
      Creates a new builder for constructing a HelpQuery.
      Type Parameters:
      S - The type of Source.
      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

      @NotNull public @NotNull Queue<HelpFilter<S>> getFilters()
      Gets the queue of filters to apply to the help entries.
      Returns:
      An unmodifiable queue of filters.
    • getRootUsagePredicate

      @NotNull public @NotNull Predicate<CommandUsage<S>> getRootUsagePredicate()
      Returns:
      Fetches the condition for including the root's CommandUsage