Java List Sub List subListPage(List baseList, int fromIndex, int maxPageSize)

Here you can find the source of subListPage(List baseList, int fromIndex, int maxPageSize)

Description

sub List Page

License

Open Source License

Declaration

public static <T> List<T> subListPage(List<T> baseList, int fromIndex, int maxPageSize) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.util.List;

public class Main {
    public static <T> List<T> subListPage(List<T> baseList, int fromIndex, int maxPageSize) {
        int toIndex = Math.min(baseList.size(), fromIndex + maxPageSize);
        return baseList.subList(fromIndex, toIndex);
    }/*from w  w w .j  a va2  s . c  om*/
}

Related

  1. subList(List query, int first, int max)
  2. subList(List src, int preBatchCount)
  3. subList(List list, int start, int end)
  4. subListByStartAndEnd( List list, M start, M end)
  5. subListMaxSize(List list, int maxSize)
  6. truncatedSubList(List inList, int start, int end)