com.interstarinc.xmedius.sendfax.model
Class BooleanValue

java.lang.Object
  extended by com.interstarinc.xmedius.sendfax.model.BooleanValue

public final class BooleanValue
extends Object

This type safe enum class defines the boolean values

Version:
$Revision: 1.6 $
Author:
André Morin
See Also:
IFaxModel, IFaxOptions

Field Summary
static BooleanValue NO
           
private  boolean value
           
static BooleanValue YES
           
 
Constructor Summary
private BooleanValue(boolean value)
           
 
Method Summary
static BooleanValue getValueFor(boolean value)
          A utility method to convert a boolean into a BooleanValue.
static BooleanValue getValueFor(String value)
          A utility method to convert a String into a BooleanValue.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

YES

public static final BooleanValue YES

NO

public static final BooleanValue NO

value

private boolean value
Constructor Detail

BooleanValue

private BooleanValue(boolean value)
Method Detail

toString

public String toString()
Overrides:
toString in class Object
Returns:
This boolean value string representation
The XML builder uses this value when converting the fax model to the XML document.

getValueFor

public static BooleanValue getValueFor(boolean value)
A utility method to convert a boolean into a BooleanValue.
This is the inverse of toString().

Parameters:
value - the boolean to be converted
Returns:
The BooleanValue instance that matches the input parameter
See Also:
toString()

getValueFor

public static BooleanValue getValueFor(String value)
                                throws IllegalArgumentException
A utility method to convert a String into a BooleanValue.
This is the inverse of toString().

Parameters:
value - the value to be converted
Expected values are : BooleanValue.YES.toString() or BooleanValue.YES.toString()
Returns:
The BooleanValue instance that matches the input parameter.
Comparison is case insensitive.
Throws:
IllegalArgumentException - if the input parameter is invalid
See Also:
toString()