Java Float Number Create toFloat(String value)

Here you can find the source of toFloat(String value)

Description

to Float

License

Open Source License

Declaration

public static Float toFloat(String value) 

Method Source Code

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

public class Main {
    public static Float toFloat(String value) {
        if (null == value) {
            return null;
        }//www.  ja  v  a2  s  .  co m
        value = value.trim();
        if ("null".equals(value)) {
            return null;
        }
        return Float.parseFloat(value);
    }

    public static Float toFloat(Object value) {
        if (null == value) {
            return null;
        }
        return toFloat(String.valueOf(value));
    }
}

Related

  1. toFloat(String str, float defaultValue)
  2. toFloat(String str, float defaultValue)
  3. toFloat(String string)
  4. toFloat(String text)
  5. toFloat(String text)
  6. toFloat(String value)
  7. toFloat(String value, float _default)
  8. toFloat(String value, Float defaultValue)
  9. toFloat(String value, float defaultValue)