public abstract class PaginatedOutput<Value,Text>
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
PaginatedOutput.Error |
| Constructor and Description |
|---|
PaginatedOutput(int resultsPerPage) |
| Modifier and Type | Method and Description |
|---|---|
abstract Text |
error(@NotNull PaginatedOutput.Error error,
java.lang.Object... args)
Formats an error message based on the provided error type and arguments.
|
abstract Text |
footer(int page,
int totalPages)
Generates the footer text for a specific page.
|
@NotNull java.util.List<Text> |
generatePage(@NotNull java.util.List<Value> results,
int page) |
abstract Text |
header(int page,
int totalPages)
Generates the header text for a specific page.
|
abstract Text |
line(Value result,
int index)
Formats a single line of output for a given result and its index.
|
@NotNull public abstract Text error(@NotNull @NotNull PaginatedOutput.Error error, java.lang.Object... args)
error - the type of errorargs - additional arguments for formatting the error message@Nullable public abstract Text header(int page, int totalPages)
page - the current page numbertotalPages - the total number of pages@Nullable public abstract Text footer(int page, int totalPages)
page - the current page numbertotalPages - the total number of pages@Nullable public abstract Text line(Value result, int index)
result - the result to formatindex - the index of the result