Here you can find the source of LongArrayFrom(long[] array)
Parameter | Description |
---|---|
array | a parameter |
public static Long[] LongArrayFrom(long[] array)
//package com.java2s; /******************************************************************************* * Copyright (c) 2010 Oracle.//from w w w .j a va2 s .c o m * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * and Apache License v2.0 which accompanies this distribution. * The Eclipse Public License is available at * http://www.eclipse.org/legal/epl-v10.html * and the Apache License v2.0 is available at * http://www.opensource.org/licenses/apache2.0.php. * You may elect to redistribute this code under either of these licenses. * * Contributors: * Hal Hildebrand - Initial JMX support ******************************************************************************/ public class Main { /** * Answer a Long array from the supplied array of longs * * @param array * @return a Long array from the supplied array of longs */ public static Long[] LongArrayFrom(long[] array) { if (array == null) { return new Long[0]; } Long[] result = new Long[array.length]; for (int i = 0; i < array.length; i++) { result[i] = array[i]; } return result; } }