Java Float Number Create toFloat(Float num, float defaultValue)

Here you can find the source of toFloat(Float num, float defaultValue)

Description

to Float

License

Apache License

Declaration

public static float toFloat(Float num, float defaultValue) 

Method Source Code

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

public class Main {

    public static float toFloat(Float num, float defaultValue) {
        if (num == null) {
            return defaultValue;
        } else {//from w  ww. j ava2 s .c  om
            return num.floatValue();
        }
    }
}

Related

  1. toFloat(final Object obj)
  2. toFloat(final Object valueRep)
  3. toFloat(final String value)
  4. toFloat(final String value)
  5. toFloat(final String value)
  6. toFloat(int colorComponent)
  7. toFloat(int hbits)
  8. toFloat(int majorVersion, int minorVersion)
  9. toFloat(int value)