Java List to Int List toIntArray_impl(List i_list, int i_offset, int i_size)

Here you can find the source of toIntArray_impl(List i_list, int i_offset, int i_size)

Description

to Int Arraimpl

License

LGPL

Declaration

public static int[] toIntArray_impl(List<Integer> i_list, int i_offset,
            int i_size) 

Method Source Code

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

import java.util.List;

public class Main {
    public static int[] toIntArray_impl(List<Integer> i_list, int i_offset,
            int i_size, int[] i_dest) {
        for (int i = 0; i < i_size; i++) {
            i_dest[i] = i_list.get(i_offset + i);
        }//from w  ww. j  a v  a  2  s .  c o m
        return i_dest;
    }

    public static int[] toIntArray_impl(List<Integer> i_list, int i_offset,
            int i_size) {
        return toIntArray_impl(i_list, i_offset, i_size, new int[i_size]);
    }

    public static int[] toIntArray_impl(byte[] i_byte) {
        int[] a = new int[i_byte.length];
        for (int i = 0; i < a.length; i++) {
            a[i] = i_byte[i] & 0xff;
        }
        return a;
    }
}

Related

  1. toIntArray(List list)
  2. toIntArray(List list)
  3. toIntArray(List list)
  4. toIntArray(List list)
  5. toIntArray(List values)
  6. toIntegerArray(final List list)
  7. toIntegerArray(List arrayValues)
  8. toIntegerArray(List values)
  9. toIntegerList(final E[] array)