Package 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.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.lang.StringfromStringForOptional(java.lang.String string)Converts the specified character string -ornull- to a value for this type.static java.lang.StringfromStringForRequired(java.lang.String string)Converts the specified character string to a value for this type.java.lang.StringgetDescription()-
Methods inherited from class org.xins.common.types.PatternType
getPattern, toString
-
Methods inherited from class org.xins.common.types.Type
checkValue, fromString, getName, getValueClass, isValidValue, toString
-
-
-
-
Field Detail
-
SINGLETON
public static final LastName SINGLETON
The only instance of this class. This field is nevernull.
-
-
Method Detail
-
fromStringForRequired
public static java.lang.String fromStringForRequired(java.lang.String string) throws java.lang.IllegalArgumentException, TypeValueExceptionConverts the specified character string to a value for this type. The character string cannot benull. If it is, then an exception is thrown.- Parameters:
string- the character string to convert to a value for this type, cannot benull.- Returns:
- the converted value for this type, never
null. - Throws:
java.lang.IllegalArgumentException- ifstring == null.TypeValueException- if the specified character string is not considered valid for this type.
-
fromStringForOptional
public static java.lang.String fromStringForOptional(java.lang.String string) throws TypeValueExceptionConverts the specified character string -ornull- to a value for this type. The character string can benullin which casenullis also returned.- Parameters:
string- the character string to convert to a value for this type, can benull.- Returns:
- the converted value for this type, or
null. - Throws:
TypeValueException- if the specified character string is not considered valid for this type.
-
getDescription
public java.lang.String getDescription()
- Overrides:
getDescriptionin classPatternType
-
-