Java Primitive Type Create toPrimitive(Character value)

Here you can find the source of toPrimitive(Character value)

Description

to Primitive

License

Apache License

Declaration

public static char toPrimitive(Character value) 

Method Source Code

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

public class Main {
    public static byte toPrimitive(Byte value) {
        return null == value ? 0 : value.byteValue();
    }/*  w  w  w.ja va  2 s  .c  o  m*/

    public static short toPrimitive(Short value) {
        return null == value ? 0 : value.shortValue();
    }

    public static int toPrimitive(Integer value) {
        return null == value ? 0 : value.intValue();
    }

    public static long toPrimitive(Long value) {
        return null == value ? 0 : value.longValue();
    }

    public static double toPrimitive(Double value) {
        return null == value ? 0 : value.doubleValue();
    }

    public static float toPrimitive(Float value) {
        return null == value ? 0 : value.floatValue();
    }

    public static char toPrimitive(Character value) {
        return null == value ? 0 : value.charValue();
    }

    public static boolean toPrimitive(Boolean value) {
        return null == value ? false : value.booleanValue();
    }
}

Related

  1. toPrimitive(Boolean b)
  2. toPrimitive(Boolean[] array)
  3. toPrimitive(Byte[] byteArray)
  4. toPrimitive(Byte[] bytes)
  5. toPrimitive(Byte[] objectArray)
  6. toPrimitive(Character[] in)
  7. toPrimitive(Class aClass)
  8. toPrimitive(Class clazz)
  9. toPrimitive(Double[] array)