Java Long Number Array Create toLongArray(Object[] arr)

Here you can find the source of toLongArray(Object[] arr)

Description

to Long Array

License

Apache License

Declaration

public static long[] toLongArray(Object[] arr) 

Method Source Code

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

public class Main {

    public static long[] toLongArray(Object[] arr) {
        long[] arr2 = new long[arr.length];
        for (int i = 0; i < arr.length; i++) {
            arr2[i] = Long.parseLong(String.valueOf(arr[i]));
        }/* ww w . j  av a 2s  . c om*/
        return arr2;
    }
}

Related

  1. toLongArray(final byte[] array)
  2. toLongArray(final int[] in)
  3. toLongArray(final long[] longs)
  4. toLongArray(int... coordinates)
  5. toLongArray(Number[] array)
  6. toLongArray(String array)
  7. toLongArray(String str, String separator)
  8. toLongArray(String[] anArray)