Here you can find the source of toLongArray(final long[] longs)
long[]
.
Parameter | Description |
---|---|
longs | the array to be converted |
public static Long[] toLongArray(final long[] longs)
//package com.java2s; //License from project: Open Source License public class Main { /**/*ww w . ja v a 2 s. c o m*/ * Produces an array of {@link Long} objects from a <code>long[]</code>. * <p> * Can be used to produce an array of objects to feed an iterator * * @param longs the array to be converted * @return an array of {@link Long} objects */ public static Long[] toLongArray(final long[] longs) { final Long[] result = new Long[longs.length]; for (int i = 0; i < longs.length; i++) { result[i] = Long.valueOf(longs[i]); } return result; } }