|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--edu.neu.ccs.XObject
|
+--edu.neu.ccs.XBoolean
Object wrapper for the primitive
boolean type that also provides
capabilities.
The default value for this class is
Stringablefalse.
| Field Summary |
| Fields inherited from class edu.neu.ccs.XObject |
changeAdapter, VALUE |
| Constructor Summary | |
XBoolean()
Constructs a wrapper for the default boolean value. |
|
XBoolean(boolean b)
Constructs a wrapper for the given boolean value. |
|
XBoolean(String s)
Constructs a wrapper for the boolean value
whose state information is encapsulated
in the given String data. |
|
| Method Summary | |
boolean |
equals(Object other)
Returns true if the wrapped object
is equal to the given object, and false
if it is not. |
void |
fromStringData(String data)
Sets the state of this object using information contained in the given String. |
boolean |
getValue()
Returns the value wrapped by this object. |
int |
hashCode()
Returns an int hash code
appropriate for the wrapped object. |
static boolean |
parseBoolean(String data)
Parses a boolean value from a String |
void |
setValue(boolean b)
Sets the value wrapped by this object to the given value. |
static boolean[] |
toPrimitiveArray(XBoolean[] x)
Returns an array of primitive boolean values
copied from the given array
of XBoolean objects. |
String |
toString()
Returns a String representation
of the wrapped value. |
String |
toStringData()
Returns a String encapsulation of this object
that contains information needed
to set the state of this object at a later time. |
static XBoolean[] |
toXArray(boolean[] a)
Returns an array of XBoolean objects
initialized from the given array
of boolean values. |
| Methods inherited from class edu.neu.ccs.XObject |
addPropertyChangeListener, addPropertyChangeListener, formatErrorMessage, removePropertyChangeListener, removePropertyChangeListener, toStringArray |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public XBoolean()
boolean value.
XBoolean(boolean),
XBoolean(String)public XBoolean(boolean b)
boolean value.
b - the value to be wrappedXBoolean(),
XBoolean(String)
public XBoolean(String s)
throws ParseException
boolean value
whose state information is encapsulated
in the given String data.
s - a String representation
of the desired value
ParseException - if the data is malformedXBoolean(),
XBoolean(boolean)| Method Detail |
public void fromStringData(String data)
throws ParseException
StringableString.
fromStringData in interface StringablefromStringData in class XObjectdata - the String containing state information
ParseException - if the data is malformedStringable.toStringData()public String toStringData()
StringableString encapsulation of this object
that contains information needed
to set the state of this object at a later time.
toStringData in interface StringabletoStringData in class XObjectStringable.fromStringData(String)public boolean equals(Object other)
true if the wrapped object
is equal to the given object, and false
if it is not.
equals in class Objectpublic int hashCode()
int hash code
appropriate for the wrapped object.
hashCode in class Objectpublic String toString()
String representation
of the wrapped value.
toString in class Objectpublic void setValue(boolean b)
b - the value to be wrappedgetValue()public boolean getValue()
setValue(boolean)
public static boolean parseBoolean(String data)
throws NumberFormatException
boolean value from a String
using the current shared parser object.
- Parameters:
data - the String data to parse
- Returns:
- the extracted
boolean value
- Throws:
NumberFormatException - if the data is malformed
public static boolean[] toPrimitiveArray(XBoolean[] x)
boolean values
copied from the given array
of XBoolean objects.
x - an array of XBooleans
boolean valuestoXArray(boolean[])public static XBoolean[] toXArray(boolean[] a)
XBoolean objects
initialized from the given array
of boolean values.
a - an array of booleans
XBoolean objectstoPrimitiveArray(XBoolean[])
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||