A - The actor typepublic static interface Help.CommandList<A extends CommandActor> extends java.lang.Iterable<ExecutableCommand<A>>
ExecutableCommands that can be
split into pages| Modifier and Type | Method and Description |
|---|---|
@Unmodifiable java.util.List<ExecutableCommand<A>> |
all()
Returns all the commands that belong to this list.
|
@Range(from=1L,to=2147483647L) int |
numberOfPages(@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. |
@Unmodifiable java.util.List<ExecutableCommand<A>> |
paginate(@Range(from=1L,to=2147483647L) int pageNumber,
@Range(from=1L,to=2147483647L) int elementsPerPage)
Returns the list of commands that belong to a specific page after paginating
this list.
|
@Unmodifiable java.util.List<ExecutableCommand<A>> all()
Note that the returned list is immutable.
@Range(from=1L,to=2147483647L) int numberOfPages(@Range(from=1L,to=2147483647L) int elementsPerPage)
elementsPerPage
elements.elementsPerPage - 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)@Unmodifiable java.util.List<ExecutableCommand<A>> paginate(@Range(from=1L,to=2147483647L) int pageNumber, @Range(from=1L,to=2147483647L) int elementsPerPage) throws InvalidHelpPageException
Note that the list returned by this method is immutable.
pageNumber - The page numberelementsPerPage - The elements to include in each pageInvalidHelpPageException - if pageNumber is greater than
numberOfPages(int) or less than 1