T - the content type@FunctionalInterface
public interface Pagination<T>
| Modifier and Type | Interface and Description |
|---|---|
static interface |
Pagination.Builder
A pagination builder.
|
static interface |
Pagination.PageCommandFunction
A page command function.
|
static interface |
Pagination.Renderer
A pagination renderer.
|
| Modifier and Type | Field and Description |
|---|---|
static Pagination.Renderer |
DEFAULT_RENDERER
The default interface renderer.
|
static char |
LINE_CHARACTER
The default line character.
|
static net.kyori.text.format.Style |
LINE_STYLE
The default line style.
|
static char |
NEXT_PAGE_BUTTON_CHARACTER
The default character for the next page button.
|
static net.kyori.text.format.Style |
NEXT_PAGE_BUTTON_STYLE
The default style for the next page button.
|
static char |
PREVIOUS_PAGE_BUTTON_CHARACTER
The default character for the previous page button.
|
static net.kyori.text.format.Style |
PREVIOUS_PAGE_BUTTON_STYLE
The default style for the next page button.
|
static int |
RESULTS_PER_PAGE
The default number of results per page.
|
static int |
WIDTH
The default interface width.
|
| Modifier and Type | Method and Description |
|---|---|
static @NonNull Pagination.Builder |
builder()
Creates a pagination builder.
|
@NonNull java.util.List<net.kyori.text.Component> |
render(@NonNull java.util.Collection<? extends T> content,
int page)
Renders.
|
static final int WIDTH
static final int RESULTS_PER_PAGE
static final char LINE_CHARACTER
static final net.kyori.text.format.Style LINE_STYLE
static final char PREVIOUS_PAGE_BUTTON_CHARACTER
static final net.kyori.text.format.Style PREVIOUS_PAGE_BUTTON_STYLE
static final char NEXT_PAGE_BUTTON_CHARACTER
static final net.kyori.text.format.Style NEXT_PAGE_BUTTON_STYLE
static final Pagination.Renderer DEFAULT_RENDERER
static @NonNull Pagination.Builder builder()
@NonNull java.util.List<net.kyori.text.Component> render(@NonNull java.util.Collection<? extends T> content, int page)
content - the content to renderpage - the page number