Java Number Value Of valueOf(Boolean value)

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

Description

Returns the string value of the given boolean.

License

Open Source License

Parameter

Parameter Description
value the boolean.

Return

the string value.

Declaration

public static String valueOf(Boolean value) 

Method Source Code

//package com.java2s;

public class Main {
    /**//from  w  w w  .j  av  a  2 s  .c om
     * Returns the string value of the given boolean. Returns null if argument
     * is null.
     * 
     * @param value the boolean.
     * @return the string value.
     */
    public static String valueOf(Boolean value) {
        return value != null ? String.valueOf(value) : null;
    }

    /**
     * Returns the boolean value of the given string. Returns null if argument
     * is null.
     * 
     * @param value the string value.
     * @return the boolean.
     */
    public static Boolean valueOf(String value) {
        return value != null ? Boolean.valueOf(value) : null;
    }
}

Related

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