Java List to Long Number Array toLongArray(List list)

Here you can find the source of toLongArray(List list)

Description

to Long Array

License

Apache License

Declaration

public static long[] toLongArray(List<Long> list) 

Method Source Code

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

import java.util.*;

public class Main {
    public static long[] toLongArray(List<Long> list) {
        long[] res = new long[list.size()];
        int i = 0;
        for (Iterator<Long> iterator = list.iterator(); iterator.hasNext();) {
            res[i++] = iterator.next();//from ww w.j  av  a 2 s. c  om
        }
        return res;
    }
}

Related

  1. toLong(List list)
  2. toLongArray(final List list)
  3. toLongArray(final List idList)
  4. toLongArray(List list)
  5. toLongArray(List list)
  6. toLongArray(List list)
  7. toLongArray(List list)
  8. toLongArray(List values)