Save This Page
Home » apache-harmony-6.0-src-r917296-snapshot » java » lang » [javadoc | source]
java.lang
public final class: Boolean [javadoc | source]
java.lang.Object
   java.lang.Boolean

All Implemented Interfaces:
    Comparable, Serializable

The wrapper for the primitive type {@code boolean}.
Field Summary
public static final  Class<Boolean> TYPE    The Class object that represents the primitive type {@code boolean}. 
public static final  Boolean TRUE    The {@code Boolean} object that represents the primitive value {@code true}. 
public static final  Boolean FALSE    The {@code Boolean} object that represents the primitive value {@code false}. 
Constructor:
 public Boolean(String string) 
    Constructs a new {@code Boolean} with its boolean value specified by {@code string}. If {@code string} is not {@code null} and is equal to "true" using a non-case sensitive comparison, the result will be a Boolean representing the primitive value {@code true}, otherwise it will be a Boolean representing the primitive value {@code false}.
    Parameters:
    string - the string representing a boolean value.
 public Boolean(boolean value) 
Method from java.lang.Boolean Summary:
booleanValue,   compareTo,   equals,   getBoolean,   hashCode,   parseBoolean,   toString,   toString,   valueOf,   valueOf
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from java.lang.Boolean Detail:
 public boolean booleanValue() 
    Gets the primitive value of this boolean, either {@code true} or {@code false}.
 public int compareTo(Boolean that) 
    Compares this object to the specified boolean object to determine their relative order.
 public boolean equals(Object o) 
    Compares this instance with the specified object and indicates if they are equal. In order to be equal, {@code o} must be an instance of {@code Boolean} and have the same boolean value as this object.
 public static boolean getBoolean(String string) 
    Returns the {@code boolean} value of the system property identified by {@code string}.
 public int hashCode() 
    Returns an integer hash code for this boolean.
 public static boolean parseBoolean(String s) 
    Parses the specified string as a {@code boolean}.
 public String toString() 
    Returns a string containing a concise, human-readable description of this boolean.
 public static String toString(boolean value) 
    Converts the specified boolean to its string representation.
 public static Boolean valueOf(String string) 
    Parses the specified string as a boolean value.
 public static Boolean valueOf(boolean b) 
    Returns a {@code Boolean} instance for the specified boolean value.

    If it is not necessary to get a new {@code Boolean} instance, it is recommended to use this method instead of the constructor, since it returns its static instances, which results in better performance.