com.mycompany.myproject.types
Class LastName
java.lang.Object
org.xins.common.types.Type
org.xins.common.types.PatternType
com.mycompany.myproject.types.LastName
- public final class LastName
- extends PatternType
Pattern type LastName.
SINGLETON
public static final LastName SINGLETON
- The only instance of this class. This field is never
null.
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.