Android Array to ArrayList Convert sequence(final int from, final int count)

Here you can find the source of sequence(final int from, final int count)

Description

sequence

License

Apache License

Declaration

public static Collection<Integer> sequence(final int from,
            final int count) 

Method Source Code

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

import java.util.Arrays;
import java.util.Collection;

public class Main {
    public static Collection<Integer> sequence(final int from,
            final int count) {
        final Integer[] arr = new Integer[count];
        for (int i = 0; i < count; i++) {
            arr[i] = Integer.valueOf(from + i);
        }//w  ww  .  j  av  a  2  s  .com
        return Arrays.asList(arr);
    }
}

Related

  1. arrayAsList(final E[] array, final int start, final int end)