Java List Sub List subList(List origin, int start, int length)

Here you can find the source of subList(List origin, int start, int length)

Description

sub List

License

Apache License

Declaration

public static <T> List<T> subList(List<T> origin, int start, int length) 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.util.Arrays;

import java.util.List;

public class Main {
    public static <T> List<T> subList(List<T> origin, int start, int length) {
        return origin.subList(start, start + length);
    }/*from  w  w  w.  ja  v a  2  s.  c  o m*/

    public static <T> List<T> subList(List<T> origin, int start) {
        return origin.subList(start, origin.size());
    }

    public static <T> List<T> subList(T[] origin, int start, int length) {
        return subList(Arrays.asList(origin), start, length);
    }

    public static <T> List<T> subList(T[] origin, int start) {
        return subList(Arrays.asList(origin), start);
    }
}

Related

  1. subList(List list, int size)
  2. subList(List list, int start, int end)
  3. sublist(List list, int start, int limit)
  4. subList(List list, int start, int max)
  5. subList(List list, int[] indexs)
  6. subList(List parentList, int start, int end)
  7. subList(List query, int first, int max)
  8. subList(List src, int preBatchCount)
  9. subList(List list, int start, int end)