public class Bool
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected static Bool |
FALSE |
protected static Bool |
TRUE |
Modifier and Type | Method and Description |
---|---|
java.lang.Boolean |
asBoolean()
Returns the Boolean value of the receiver.
|
boolean |
booleanValue()
Returns the boolean value of the receiver
|
boolean |
equals(Bool bool)
Returns whether the given Bool object is equal to the receiver.
|
boolean |
equals(boolean bool)
Returns whether the given boolean value is equal to the receiver.
|
boolean |
equals(java.lang.Boolean bool)
Returns whether the given Boolean object is equal to the receiver.
|
boolean |
equals(java.lang.Object obj)
Returns whether the given object is equal to the receiver.
|
static Bool |
get(boolean bool)
Returns the Bool instance corresponding to the given boolean value.
|
static Bool |
get(java.lang.Boolean bool)
Returns the Bool instance corresponding to the given Boolean value.
|
static Bool |
get(java.lang.String boolStr)
Returns the Bool instance corresponding to the given String value.
|
protected boolean |
getBoolValue() |
static Bool |
getFalse()
Returns the Bool instance that represents the true value.
|
static Bool |
getTrue()
Returns the Bool instance that represents the true value.
|
int |
hashCode()
Returns a hash code of the Bool object.
|
boolean |
isFalse()
Returns true if the receiver is a representation of false.
|
static boolean |
isFalse(java.lang.Object anObject)
Returns true, if the given object is a sort of boolean "false" representation
otherwise false.
|
boolean |
isTrue()
Returns true if the receiver is a representation of true.
|
static boolean |
isTrue(java.lang.Object anObject)
Returns true, if the given object is a sort of boolean "true" representation
otherwise false.
|
Bool |
not()
Returns the opposite value of the receiver.
|
protected void |
setBoolValue(boolean newValue) |
static java.lang.Boolean |
toBoolean(boolean flag)
Returns the Boolean object Boolean.FALSE or Boolean.TRUE that
corresponds to the given boolean flag.
|
java.lang.String |
toString()
Returns the string representation of the receiver,
which is either "true" or "false".
|
protected boolean getBoolValue()
protected void setBoolValue(boolean newValue)
public static Bool getTrue()
public static Bool getFalse()
public static boolean isTrue(java.lang.Object anObject)
public static boolean isFalse(java.lang.Object anObject)
isTrue()
. All others are
treated as a false representation.public static Bool get(boolean bool)
public static Bool get(java.lang.Boolean bool)
public static Bool get(java.lang.String boolStr)
public static java.lang.Boolean toBoolean(boolean flag)
public boolean isTrue()
public boolean isFalse()
public Bool not()
public java.lang.Boolean asBoolean()
public boolean booleanValue()
public boolean equals(boolean bool)
public boolean equals(java.lang.Boolean bool)
public boolean equals(Bool bool)
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
Boolean.hashCode()
public java.lang.String toString()
toString
in class java.lang.Object