com.mycompany.myproject.types
Class LastName

java.lang.Object
  extended byorg.xins.common.types.Type
      extended byorg.xins.common.types.PatternType
          extended bycom.mycompany.myproject.types.LastName

public final class LastName
extends PatternType

Pattern type LastName.


Field Summary
static LastName SINGLETON
          The only instance of this class.
 
Method Summary
static String fromStringForOptional(String string)
          Converts the specified character string -or null- to a value for this type.
static String fromStringForRequired(String string)
          Converts the specified character string to a value for this type.
 
Methods inherited from class org.xins.common.types.PatternType
fromStringImpl, getPattern, isValidValueImpl, toString
 
Methods inherited from class org.xins.common.types.Type
checkValue, fromString, getName, getValueClass, isValidValue, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SINGLETON

public static final LastName SINGLETON
The only instance of this class. This field is never null.

Method Detail

fromStringForRequired

public static String fromStringForRequired(String string)
                                    throws IllegalArgumentException,
                                           TypeValueException
Converts the specified character string to a value for this type. The character string cannot be null. If it is, then an exception is thrown.

Parameters:
string - the character string to convert to a value for this type, cannot be null.
Returns:
the converted value for this type, never null.
Throws:
IllegalArgumentException - if string == null.
TypeValueException - if the specified character string is not considered valid for this type.

fromStringForOptional

public static String fromStringForOptional(String string)
                                    throws TypeValueException
Converts the specified character string -or null- to a value for this type. The character string can be null in which case null is also returned.

Parameters:
string - the character string to convert to a value for this type, can be null.
Returns:
the converted value for this type, or null.
Throws:
TypeValueException - if the specified character string is not considered valid for this type.