Java Number Value Of valueOf(Boolean value)

Here you can find the source of valueOf(Boolean value)

Description

value Of

License

Apache License

Declaration

public static boolean valueOf(Boolean value) 

Method Source Code

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

public class Main {
    public static byte valueOf(Byte value) {
        if (value == null)
            return 0;
        return value.byteValue();
    }/*from  w  w w  .  j  a  v  a  2  s . co  m*/

    public static short valueOf(Short value) {
        if (value == null)
            return 0;
        return value.shortValue();
    }

    public static int valueOf(Integer value) {
        if (value == null)
            return 0;
        return value.intValue();
    }

    public static long valueOf(Long value) {
        if (value == null)
            return 0;
        return value.longValue();
    }

    public static double valueOf(Double value) {
        if (value == null)
            return 0;
        return value.doubleValue();
    }

    public static float valueOf(Float value) {
        if (value == null)
            return 0;
        return value.floatValue();
    }

    public static boolean valueOf(Boolean value) {
        if (value == null)
            return false;
        return value.booleanValue();
    }

    public static char valueOf(Character value) {
        if (value == null)
            return 0;
        return value.charValue();
    }
}

Related

  1. valueOf(Boolean b)
  2. valueOf(boolean b)
  3. valueOf(Boolean bool)
  4. valueOf(boolean flag)
  5. valueOf(boolean tmp)
  6. valueOf(Boolean value)
  7. valueOf(char c)
  8. valueOf(char hexChar)
  9. valueOf(Class enumType, int ordinal)