Methods Summary |
---|
public boolean | booleanValue()Gets the primitive value of this boolean, either {@code true} or
{@code false}.
return value;
|
public int | compareTo(java.lang.Boolean that)Compares this object to the specified boolean object to determine their
relative order.
if (that == null) {
throw new NullPointerException();
}
if (this.value == that.value) {
return 0;
}
return this.value ? 1 : -1;
|
public boolean | equals(java.lang.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.
return (o == this)
|| ((o instanceof Boolean) && (value == ((Boolean) o).value));
|
public static boolean | getBoolean(java.lang.String string)Returns the {@code boolean} value of the system property identified by
{@code string}.
if (string == null || string.length() == 0) {
return false;
}
return (parseBoolean(System.getProperty(string)));
|
public int | hashCode()Returns an integer hash code for this boolean.
return value ? 1231 : 1237;
|
public static boolean | parseBoolean(java.lang.String s)Parses the specified string as a {@code boolean}.
return "true".equalsIgnoreCase(s); //$NON-NLS-1$
|
public static java.lang.String | toString(boolean value)Converts the specified boolean to its string representation.
return String.valueOf(value);
|
public java.lang.String | toString()Returns a string containing a concise, human-readable description of this
boolean.
return String.valueOf(value);
|
public static java.lang.Boolean | valueOf(java.lang.String string)Parses the specified string as a boolean value.
return parseBoolean(string) ? Boolean.TRUE : Boolean.FALSE;
|
public static java.lang.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.
return b ? Boolean.TRUE : Boolean.FALSE;
|