public class ModBoolean
extends java.lang.Number
implements java.lang.Comparable
Modifier and Type | Field and Description |
---|---|
protected boolean |
booleanVal |
Constructor and Description |
---|
ModBoolean(boolean value)
Allocates a ModBoolean object representing the value argument.
|
ModBoolean(java.lang.Boolean bObj)
Allocates a ModBoolean object which holds the given Boolean object.
|
ModBoolean(java.lang.String str)
Allocates a ModBoolean object representing the value true if the
string argument is not null and is equal, ignoring case, to the
string "true".
|
Modifier and Type | Method and Description |
---|---|
boolean |
booleanValue()
Returns the value of this ModBoolean object as a boolean primitive.
|
byte |
byteValue()
Returns the value of this object as a byte.
|
int |
compareTo(java.lang.Object obj)
Compares this object with the specified object 'obj'.
|
double |
doubleValue()
Returns the value of this object as a double.
|
boolean |
equals(java.lang.Object obj)
Returns true if and only if the argument is not null and is a
ModBoolean, BooleanCp or Boolean object that represents the same
boolean value as this object.
|
float |
floatValue()
Returns the value of this object as a float.
|
boolean |
getValue()
Returns the value of this ModBoolean object as a boolean primitive.
|
int |
hashCode()
Returns a hash code for this ModBoolean object.
|
int |
intValue()
Returns the value of this object as an int.
|
long |
longValue()
Returns the value of this object as a long.
|
void |
setValue(boolean val)
Sets the value of this ModBoolean object.
|
short |
shortValue()
Returns the value of this object as a short.
|
java.lang.String |
toString()
Returns a String object representing this ModBoolean's value.
|
static ModBoolean |
valueOf(java.lang.String s)
Returns the boolean value represented by the specified String.
|
public ModBoolean(boolean value)
value
- the value of the ModBoolean.public ModBoolean(java.lang.String str)
str
- the string to be converted to a ModBoolean.public ModBoolean(java.lang.Boolean bObj)
bObj
- the value of the ModBoolean.public void setValue(boolean val)
val
- boolean value to be set.public boolean getValue()
public boolean booleanValue()
public static ModBoolean valueOf(java.lang.String s)
s
- a string.public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- the object to compare with.public int intValue()
intValue
in class java.lang.Number
public long longValue()
longValue
in class java.lang.Number
public float floatValue()
floatValue
in class java.lang.Number
public double doubleValue()
doubleValue
in class java.lang.Number
public byte byteValue()
byteValue
in class java.lang.Number
public short shortValue()
shortValue
in class java.lang.Number
public int compareTo(java.lang.Object obj)
compareTo
in interface java.lang.Comparable
obj
- an object to compare to.java.lang.ClassCastException
- if the specified object's type
prevents it from being compared to this object.