public class MBoolean
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
static MBoolean |
FALSE
The MBoolean field that corresponds to the primitive boolean value false.
|
static MBoolean |
TRUE
The MBoolean field that corresponds to the primitive boolean value true.
|
Constructor and Description |
---|
MBoolean(boolean value)
Constructs an MBoolean object and sets it to the specified boolean value.
|
MBoolean(java.lang.String s)
Constructs an MBoolean object and sets it according to the value specified in the String parameter, s.
|
Modifier and Type | Method and Description |
---|---|
boolean |
booleanValue()
Returns the value of this MBoolean object as a boolean primitive.
|
boolean |
equals(java.lang.Object obj)
Compares this MBoolean object with another specified object and returns true if both objects have the same boolean value.
|
static boolean |
getBoolean(java.lang.String name)
Checks the value of the specified system property and returns true if that property contains the string "true".
|
boolean |
getValue()
Returns this MBoolean object's value as a boolean.
|
void |
setValue(boolean b)
Sets this MBoolean object's value to the specified boolean value.
|
java.lang.String |
toString()
Returns a String representation of this MBoolean object's boolean value.
|
static MBoolean |
valueOf(java.lang.String s)
Returns an MBoolean object set according to the value of the String parameter s.
|
public static final MBoolean TRUE
public static final MBoolean FALSE
public MBoolean(boolean value)
value
- The boolean value to which you want this MBoolean object set.public MBoolean(java.lang.String s)
s
- A String that specifies whether the MBoolean object will be set to true or false as follows.
Examples:
new MBoolean("True") constructs an MBoolean object representing the boolean value true.
new MBoolean("hack") constructs an MBoolean object representing the boolean value false.
public boolean booleanValue()
public static MBoolean valueOf(java.lang.String s)
s
- A String that specifies whether the returned MBoolean object will be set to true or false as follows.
Examples:
MBoolean.valueOf("True") returns an MBoolean object representing the boolean value true.
MBoolean.valueOf("hack") returns an MBoolean object representing the boolean value false.
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- The Object to which this MBoolean will be compared.public static boolean getBoolean(java.lang.String name)
Note: System properties are accessed through getProperty, a method defined in the System class.
name
- A String that specifies the name of the system property that is to be checked.public void setValue(boolean b)
b
- A boolean specifying the value to which this MBoolean object is to be set.public boolean getValue()