Class ListUtils

java.lang.Object
org.qubership.atp.ram.utils.ListUtils

public class ListUtils extends Object
  • Constructor Details

    • ListUtils

      public ListUtils()
  • Method Details

    • applyPagination

      public static <T> List<T> applyPagination(List<T> data, Integer page, Integer size)
      Applies pagination to list of data with type T.
      Type Parameters:
      T - type of data
      Parameters:
      data - list of data
      page - number of page for pagination
      size - count of items at 1 page
      Returns:
      Paginated list of data
    • applyPagination

      public static <T> List<T> applyPagination(List<T> data, Integer page, Integer size, Integer shift)
      Applies pagination to list of data with type T.
      Type Parameters:
      T - type of data
      Parameters:
      data - list of data
      page - number of page for pagination
      size - count of items at 1 page
      Returns:
      Paginated list of data
    • applyPaginationByIndexes

      public static <T> List<T> applyPaginationByIndexes(List<T> data, Integer startIndex, Integer endIndex)
      Applies pagination to list of data with type T.
      Type Parameters:
      T - type of data
      Parameters:
      data - list of data
      startIndex - start index
      endIndex - end index
      Returns:
      Paginated list of data