Enum Class PaginationSourceSpec.Kind

java.lang.Object
java.lang.Enum<PaginationSourceSpec.Kind>
tech.guilhermekaua.spigotboot.inventoryapi.internal.pagination.PaginationSourceSpec.Kind
All Implemented Interfaces:
Serializable, Comparable<PaginationSourceSpec.Kind>, Constable
Enclosing class:
PaginationSourceSpec<T>

public static enum PaginationSourceSpec.Kind extends Enum<PaginationSourceSpec.Kind>
The four ways a view can declare where page elements come from.
  • Enum Constant Details

    • EAGER_STATIC

      public static final PaginationSourceSpec.Kind EAGER_STATIC
      View.paginate(List): one immutable in-memory source shared by every context.
    • EAGER_LAZY

      public static final PaginationSourceSpec.Kind EAGER_LAZY
      View.paginate(Function): the function runs once per context at init (and again on refresh), each result wrapped in a fresh eager source.
    • ASYNC

      public static final PaginationSourceSpec.Kind ASYNC
      View.paginateAsync(AsyncPageSupplier): a fresh async source per context.
    • CUSTOM

      public static final PaginationSourceSpec.Kind CUSTOM
      View.paginateSource(Function): the escape hatch, the factory runs once per context.
  • Method Details

    • values

      public static PaginationSourceSpec.Kind[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static PaginationSourceSpec.Kind valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null