Java Float Number Create toFloat(Object _inStrObj)

Here you can find the source of toFloat(Object _inStrObj)

Description

to Float

License

Open Source License

Declaration

public static float toFloat(Object _inStrObj) 

Method Source Code

//package com.java2s;

public class Main {

    public static float toFloat(Object _inStrObj) {
        if (_inStrObj == null || _inStrObj.toString().trim().equals("")) {
            return 0;
        } else {/*from   ww  w. j a v a 2  s  .  c  o m*/
            return Float.valueOf(_inStrObj.toString()).floatValue();
        }
    }
}

Related

  1. toFloat(int value)
  2. toFloat(int x)
  3. toFloat(int[] array)
  4. toFloat(long intPart, long decimalPart, long decimalPlaces)
  5. toFloat(Number value)
  6. toFloat(Object anObj)
  7. toFloat(Object literal)
  8. toFloat(Object o)
  9. toFloat(Object o)