Example usage for java.lang Boolean toString

List of usage examples for java.lang Boolean toString

Introduction

In this page you can find the example usage for java.lang Boolean toString.

Prototype

public String toString() 

Source Link

Document

Returns a String object representing this Boolean's value.

Usage

From source file:Main.java

public static void main(String[] args) {
    Boolean b = Boolean.valueOf("true");
    System.out.println(b.toString());
}

From source file:Main.java

public static void main(String[] args) {

    Boolean boolean1 = new Boolean("true");
    System.out.println(boolean1.toString());

}

From source file:Main.java

public static void main(String args[]) {
    Boolean b1 = new Boolean("TRUE");
    Boolean b2 = new Boolean("FALSE");
    System.out.println(b1.toString() + " or " + b2.toString());
    for (int j = 0; j < 16; ++j)
        System.out.print(Character.forDigit(j, 16));

    Integer i = new Integer(Integer.parseInt("ef", 16));
    Long l = new Long(Long.parseLong("abcd", 16));
    long m = l.longValue() * i.longValue();
    System.out.println(Long.toString(m, 8));

}

From source file:Main.java

public static void main(String args[]) {
    Boolean b1 = new Boolean("TRUE");
    Boolean b2 = new Boolean("FALSE");
    System.out.println(b1.toString() + " or " + b2.toString());
    for (int j = 0; j < 16; ++j)
        System.out.print(Character.forDigit(j, 16));

    Integer i = new Integer(Integer.parseInt("ef", 16));
    Long l = new Long(Long.parseLong("abcd", 16));
    long m = l.longValue() * i.longValue();
    System.out.println(Long.toString(m, 8));
    System.out.println(Float.MIN_VALUE);
    System.out.println(Double.MAX_VALUE);
}

From source file:WrappedClassApp.java

public static void main(String args[]) {
    Boolean b1 = new Boolean("TRUE");
    Boolean b2 = new Boolean("FALSE");
    System.out.println(b1.toString() + " or " + b2.toString());
    for (int j = 0; j < 16; ++j)
        System.out.print(Character.forDigit(j, 16));
    System.out.println();//from   w  w w  .  ja  v  a  2s.c  o  m
    Integer i = new Integer(Integer.parseInt("ef", 16));
    Long l = new Long(Long.parseLong("abcd", 16));
    long m = l.longValue() * i.longValue();
    System.out.println(Long.toString(m, 8));
    System.out.println(Float.MIN_VALUE);
    System.out.println(Double.MAX_VALUE);
}

From source file:com.laex.cg2d.model.util.BooleanUtil.java

/**
 * To string.//w w  w.j  a  va2s. c  o m
 * 
 * @param value
 *          the value
 * @return the string
 */
public static String toString(Boolean value) {
    return value.toString();
}

From source file:Main.java

/**
 * @see #createChild(Element, String, String)
 *//*w  w w.ja  v  a 2s  .  co  m*/
public static Element createTextChild(Node elem, String elemName, Boolean text) {
    return createTextChild(elem, elemName, text == null ? "false" : text.toString());
}

From source file:com.codenvy.cas.util.LdapUtils.java

/**
 * Reads a Boolean value from the LdapEntry.
 *
 * @param ctx       the ldap entry//from   w  ww. j a v  a  2s . com
 * @param attribute the attribute name
 * @param nullValue the value which should be returning in case of a null value
 * @return <code>true</code> if the attribute's value matches (case-insensitive) <code>"true"</code>, otherwise false
 */
public static Boolean getBoolean(final LdapEntry ctx, final String attribute, final Boolean nullValue) {
    final String v = getString(ctx, attribute, nullValue.toString());
    if (v != null) {
        return v.equalsIgnoreCase(Boolean.TRUE.toString());
    }
    return nullValue;
}

From source file:airlift.util.FormatUtil.java

public static String format(Boolean _boolean) {
    String booleanString = "";

    if (_boolean != null) {
        booleanString = _boolean.toString();
    }// ww w. ja  va 2s .c o  m

    return booleanString;
}

From source file:com.openappengine.utility.ObjectConverter.java

/**
 * Converts Boolean to String.//  w ww. j a  v  a  2  s  . co m
 * @param value The Boolean to be converted.
 * @return The converted String value.
 */
public static String booleanToString(Boolean value) {
    return value.toString();
}