Java tutorial
//package com.java2s; import java.util.Collection; import java.util.Iterator; public class Main { public static long[] getLongArray(Collection<Long> a_collection) /* */ { /* 109 */long[] alResult = new long[0]; /* */ /* 111 */if (a_collection != null) /* */ { /* 113 */alResult = new long[a_collection.size()]; /* 114 */int i = 0; /* */ /* 116 */if (a_collection != null) /* */ { /* 118 */Iterator it = a_collection.iterator(); /* 119 */while (it.hasNext()) /* */ { /* 121 */alResult[(i++)] = ((Long) it.next()).longValue(); /* */} /* */} /* */} /* 125 */return alResult; /* */} }