Java Float Number Convert to convertFloatArray(float[] arr)

Here you can find the source of convertFloatArray(float[] arr)

Description

convert Float Array

License

Open Source License

Declaration

public static Float[] convertFloatArray(float[] arr) 

Method Source Code

//package com.java2s;
/*//from ww  w  .  ja  v a  2  s .  c o  m
 * PortUtil.cs
 * Copyright ? 2009-2011 kbinani
 *
 * This file is part of org.kbinani.
 *
 * org.kbinani is free software; you can redistribute it and/or
 * modify it under the terms of the BSD License.
 *
 * org.kbinani is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 */

public class Main {
    public static Float[] convertFloatArray(float[] arr) {
        Float[] ret = new Float[arr.length];

        for (int i = 0; i < arr.length; i++) {
            ret[i] = arr[i];
        }

        return ret;
    }

    public static float[] convertFloatArray(Float[] arr) {
        float[] ret = new float[arr.length];

        for (int i = 0; i < arr.length; i++) {
            ret[i] = arr[i];
        }

        return ret;
    }

    public static char[] convertFloatArray(Character[] arr) {
        char[] ret = new char[arr.length];

        for (int i = 0; i < arr.length; i++) {
            ret[i] = arr[i];
        }

        return ret;
    }
}

Related

  1. convertFloat(float amount, boolean speech)
  2. convertFloat(String str, float defaults)
  3. convertFloatArrayToString(float[] value, String separator)
  4. convertFloatBitsToHFloat(final int floatBits)
  5. convertFloatDouble(float[] in)
  6. convertFloatFromBytes(byte[] byteArray)