Java List to Array listToArray(List list)

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

Description

list To Array

License

BSD License

Declaration

public static float[] listToArray(List<Float> list) 

Method Source Code

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

import java.util.List;

public class Main {
    public static float[] listToArray(List<Float> list) {
        int size = list != null ? list.size() : 0;
        float[] floatArr = new float[size];
        for (int i = 0; i < size; i++) {
            floatArr[i] = list.get(i);/*  w ww.j  ava 2 s.  co  m*/
        }
        return floatArr;
    }
}

Related

  1. listToArray(List list)
  2. listToArray(List bytes)
  3. listToArray(List list)
  4. listToArray(List doubles)
  5. listToArray(List list)
  6. ListToArray(List list)
  7. listToArray(List list)
  8. ListToArray(List> values)
  9. listToArray(List list)