com.interstarinc.xmedius.sendfax.model
Class FaxPriority

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

public final class FaxPriority
extends Object

This type safe enum class defines the fax priority values

Version:
$Revision: 1.5 $
Author:
André Morin
See Also:
IFaxOptions.getFaxPriority()

Field Summary
static FaxPriority HIGH
           
static FaxPriority LOW
           
static FaxPriority NORMAL
           
private  String priority
           
 
Constructor Summary
private FaxPriority(String priority)
           
 
Method Summary
static FaxPriority getValueFor(int priority)
          A utility method to convert an int into a FaxPriority.
static FaxPriority getValueFor(String priority)
          A utility method to convert a String into a FaxPriority.
 int toInt()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

LOW

public static final FaxPriority LOW

HIGH

public static final FaxPriority HIGH

NORMAL

public static final FaxPriority NORMAL

priority

private String priority
Constructor Detail

FaxPriority

private FaxPriority(String priority)
Method Detail

toString

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

toInt

public int toInt()
          throws UnsupportedOperationException
Returns:
The int representation of this fax priority
Throws:
UnsupportedOperationException - if this fax priority can not be converted

getValueFor

public static FaxPriority getValueFor(int priority)
                               throws IllegalArgumentException
A utility method to convert an int into a FaxPriority.
This is the inverse of toString().

Parameters:
priority - a fax priority to be converted.
Expected values : any value returned by toInt() applied on a instance of this class.
Returns:
The FaxPriority instance that matches the input parameter.
Throws:
IllegalArgumentException - if the input parameter is not an expected value.
See Also:
toInt()

getValueFor

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

Parameters:
priority - a fax priority to be converted.
Expected values : any value returned by toString() applied on a instance of this class.
Returns:
The FaxPriority instance that matches the input parameter.
Comparison is case insensitive.
Throws:
IllegalArgumentException - if the input parameter is not an expected value.
See Also:
toString()