com.phoenix_int.aserver.types
Class PHXBoolean

java.lang.Object
  extended by com.phoenix_int.aserver.types.PHXSimpleType
      extended by com.phoenix_int.aserver.types.PHXBoolean
All Implemented Interfaces:
IPHXType, IPHXType2, IPHXUnits

public class PHXBoolean
extends PHXSimpleType

The Phoenix type for booleans. This class adds the following features to the PHXSimpleType:

See Also:
PHXSimpleType

Constructor Summary
PHXBoolean()
          initializes value to false
 
Method Summary
 void fromString(java.lang.String value)
          converts a String representation to the internal value
 void fromString2(PHXStringBuffer value)
          converts a PHXStringBuffer representation to the internal value
 boolean getValue()
          retrieves the current value of the variable
 java.lang.String getValueStr()
          retrieves the string value of this variable as passed into the last call to fromString().
static boolean parse(java.lang.Object value)
          a utility function to convert a string to a boolean value
 void setIgnoreConversionErrors(boolean ignoreConversionErrors)
          indicates whether the object should accept bad values in the fromString() method without throwning an exception.
 void setValue(boolean v)
          sets the value for the variable
 java.lang.String toString()
          converts the variable to a string
 PHXStringBuffer toString2()
          converts the variable to a PHXStringBuffer
 
Methods inherited from class com.phoenix_int.aserver.types.PHXSimpleType
addPropertyChangeListener, getDescription, getEnumTokens, getHasChanged, getUnits, removePropertyChangeListener, setDescription, setHasChanged, setUnits
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PHXBoolean

public PHXBoolean()
initializes value to false

Method Detail

getValue

public boolean getValue()
retrieves the current value of the variable

Returns:
the value of the variable

getValueStr

public java.lang.String getValueStr()
retrieves the string value of this variable as passed into the last call to fromString(). This may not be equivalent to the current value of the variable.

Returns:
the string last used to set the variable

setValue

public void setValue(boolean v)
sets the value for the variable

Parameters:
v - the value

toString2

public PHXStringBuffer toString2()
converts the variable to a PHXStringBuffer

Returns:
a PHXStringBuffer representation of the variable

toString

public java.lang.String toString()
converts the variable to a string

Specified by:
toString in interface IPHXType
Overrides:
toString in class java.lang.Object
Returns:
a String representation of the variable

fromString2

public void fromString2(PHXStringBuffer value)
converts a PHXStringBuffer representation to the internal value

Parameters:
value - the value to convert

fromString

public void fromString(java.lang.String value)
converts a String representation to the internal value

Parameters:
value - the value to convert

parse

public static boolean parse(java.lang.Object value)
a utility function to convert a string to a boolean value

Parameters:
value - the string
Returns:
a boolean value

setIgnoreConversionErrors

public void setIgnoreConversionErrors(boolean ignoreConversionErrors)
indicates whether the object should accept bad values in the fromString() method without throwning an exception. The raw values is stored in property valueStr regardless.

Parameters:
ignoreConversionErrors - true if errors should be ignored