Java List Clone getClonedSublistOf(List list, int startIndexInclusive, int endIndexExclusive)

Here you can find the source of getClonedSublistOf(List list, int startIndexInclusive, int endIndexExclusive)

Description

get Cloned Sublist Of

License

Apache License

Declaration

public static List<String> getClonedSublistOf(List<String> list, int startIndexInclusive,
            int endIndexExclusive) 

Method Source Code


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

import java.util.ArrayList;
import java.util.List;

public class Main {
    public static List<String> getClonedSublistOf(List<String> list, int startIndexInclusive,
            int endIndexExclusive) {
        List<String> subList = new ArrayList<String>();
        for (int i = startIndexInclusive; i < endIndexExclusive; ++i)
            subList.add(list.get(i));/*w  w  w. j  a va 2s  . c  o m*/
        return subList;
    }
}

Related

  1. cloneStringList(List list)
  2. cloneStringList(List list)
  3. cloneStringList(List toClone)
  4. cloneToList(final Collection list)
  5. getClone(List> lls)