Java Float Number Create toFloat(Object v)

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

Description

to Float

License

Apache License

Declaration

private static Float toFloat(Object v) 

Method Source Code

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

public class Main {
    private static Float toFloat(Object v) {
        if (null == v)
            return null;
        if (v instanceof Number)
            return ((Number) v).floatValue();
        return Float.parseFloat(v.toString());
    }//ww  w .  ja v a  2s .c o m
}

Related

  1. toFloat(Object obj)
  2. toFloat(Object obj)
  3. toFloat(Object obj)
  4. toFloat(Object obj, String pattern)
  5. toFloat(Object rawColor)
  6. toFloat(Object val)
  7. toFloat(Object val)
  8. toFloat(Object value)
  9. toFloat(Object value)