Java Long Number Create toLong(double[] v)

Here you can find the source of toLong(double[] v)

Description

to Long

License

Open Source License

Declaration

public static long[] toLong(double[] v) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static long[] toLong(double[] v) {
        final long[] ans = new long[v.length];
        for (int k = 0; k < v.length; k++)
            ans[k] = (long) v[k];
        return (ans);
    }//from   w w w  .  j  a  v  a 2s  .  c  o m

    public static long[] toLong(float[] v) {
        final long[] ans = new long[v.length];
        for (int k = 0; k < v.length; k++)
            ans[k] = (long) v[k];
        return (ans);
    }

    public static long[] toLong(int[] v) {
        final long[] ans = new long[v.length];
        for (int k = 0; k < v.length; k++)
            ans[k] = (long) v[k];
        return (ans);
    }

    public static long[][] toLong(float[][] v) {
        final long[][] ans = new long[v.length][];
        for (int k = 0; k < v.length; k++)
            ans[k] = toLong(v[k]);
        return (ans);
    }

    public static long[][] toLong(double[][] v) {
        final long[][] ans = new long[v.length][];
        for (int k = 0; k < v.length; k++)
            ans[k] = toLong(v[k]);
        return (ans);
    }

    public static long[][] toLong(int[][] v) {
        final long[][] ans = new long[v.length][];
        for (int k = 0; k < v.length; k++)
            ans[k] = toLong(v[k]);
        return (ans);
    }
}

Related

  1. toLong(byte[] value)
  2. toLong(byte[] value)
  3. toLong(byte[] vint)
  4. toLong(double val)
  5. toLong(double[] in, long[] out)
  6. toLong(final byte[] array, final int offset, final int length)
  7. toLong(final byte[] b)
  8. toLong(final byte[] b, final int offset)
  9. toLong(final byte[] bytes, final int offset)