Here you can find the source of listToArray(List ids)
Parameter | Description |
---|---|
ids | the ids list. |
static long[] listToArray(List ids)
//package com.java2s; import java.util.List; public class Main { /**/*from w ww. j ava 2s.c o m*/ * Converts the give list of Long objects to array. * * @param ids the ids list. * @return the ids array. */ static long[] listToArray(List ids) { long[] result = new long[ids.size()]; for (int i = 0; i < result.length; i++) { result[i] = ((Long) ids.get(i)).longValue(); } return result; } }