Java List to Float Array toFloatArray(java.util.List list, float[] res)

Here you can find the source of toFloatArray(java.util.List list, float[] res)

Description

to Float Array

License

Apache License

Declaration

public static float[] toFloatArray(java.util.List<Float> list, float[] res) 

Method Source Code

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

public class Main {
    public static float[] toFloatArray(java.util.List<Float> list, float[] res) {
        if (res == null)
            res = new float[list.size()];
        int i = 0;
        for (Float e : list)
            res[i++] = e.floatValue();//  ww w. jav a2  s  .  c  o  m
        return res;
    }
}

Related

  1. toFloatArray(Float[] list)
  2. toFloatArray(List list)
  3. toFloatArray(List list)
  4. toFloatArray(List list)
  5. toFloatArray(List list)