public interface Help
| Modifier and Type | Interface and Description |
|---|---|
static interface |
Help.ChildrenCommands<A extends CommandActor>
Contains all children commands of a certain
ExecutableCommand. |
static interface |
Help.CommandList<A extends CommandActor>
Represents a generic list of
ExecutableCommands that can be
split into pages |
static interface |
Help.RelatedCommands<A extends CommandActor>
Contains all children and sibling commands of a certain
ExecutableCommand. |
static interface |
Help.SiblingCommands<A extends CommandActor>
Contains all sibling commands of a certain
ExecutableCommand. |
| Modifier and Type | Method and Description |
|---|---|
static @Range(from=1L,to=9223372036854775807L) int |
numberOfPages(@Range(from=0L,to=2147483647L) int numberOfEntries,
@Range(from=1L,to=2147483647L) int elementsPerPage)
Returns the number of pages this list would generate if
it were to be split pages where each page contains
elementsPerPage
elements. |
static <A extends CommandActor> |
paginate(@NotNull java.util.List<ExecutableCommand<A>> commands,
@Range(from=1L,to=2147483647L) int page,
@Range(from=1L,to=2147483647L) int elementsPerPage)
Returns the list of commands that belong to a specific page after paginating
this list.
|
@NotNull static <A extends CommandActor> @NotNull @Unmodifiable java.util.List<ExecutableCommand<A>> paginate(@NotNull @NotNull java.util.List<ExecutableCommand<A>> commands, @Range(from=1L,to=2147483647L) int page, @Range(from=1L,to=2147483647L) int elementsPerPage) throws InvalidHelpPageException
Note that the list returned by this method is immutable.
commands - The list of commands to paginatepage - The page numberelementsPerPage - The elements to include in each pageInvalidHelpPageException - if pageNumber is greater than
numberOfPages(int, int) or less than 1static @Range(from=1L,to=9223372036854775807L) int numberOfPages(@Range(from=0L,to=2147483647L) int numberOfEntries,
@Range(from=1L,to=2147483647L) int elementsPerPage)
elementsPerPage
elements.numberOfEntries - The number of entrieselementsPerPage - Maximum number of elements to include in each page. Note
that the last page may contain less than this number (it will
be the remainder)