Class Pages

java.lang.Object
com.atlassian.greenhopper.service.Pages

@PublicApi public class Pages extends Object
Provides support for creating pages from list.
Since:
6.7
  • Constructor Details

    • Pages

      public Pages()
  • Method Details

    • toPage

      public static <T> Page<T> toPage(Iterable<T> values, PageRequest request, @Nullable Long total)
      Creates a page from values and a PageRequest. This method will fill information about the the total number of values, start and size of the returned page.
      Type Parameters:
      T - the type of values from which page is created
      Parameters:
      values - iterable of values from which the page is created
      request - request for the page
      Returns:
      the page with filtered and transformed values
    • builder

      public static <T> Pages.Builder<T> builder(@Nonnull List<T> values)