Create a Pic from an input String, see fromString(input:String):Either*.
Create a Pic from an input String, returning an scala.util.Either.
Create a Pic from an input String, returning an scala.util.Either.
See also fromStringUnsafe for cases where you are sure that the input is a valid PIC (or you are willing to handle exceptions).
Examples:
>>> Pic("070377-281V") Right(070377-281V) >>> Pic("070377-281") Left(Invalid PIC: '070377-281'. PIC should have 11 characters, but was 10 characters.) >>> Pic("070377-2818") Left(Invalid PIC: '070377-2818'. The control character ('8') is wrong: it should be 'V'.)
a valid Personal Identity Code as a String.
Left(String) if the given String is not a valid PIC, return a scala.util.Left containing an error message. Right(Pic) if the given String is a valid PIC, return a scala.util.Right containing the Pic object.
A shorter alias for fromStringUnsafe.
A shorter alias for fromStringUnsafe. See the documentation for that function.
Examples:
>>> Pic.fromStringU("070377-281V") 070377-281V >>> // Pic.fromStringU("foo") would throw an IllegalArgumentException.
Create a T from an input String, throwing an scala.IllegalArgumentException if the input is not a valid String representation of T.
Create a T from an input String, throwing an scala.IllegalArgumentException if the input is not a valid String representation of T.
See also:
Examples:
>>> Pic.fromStringUnsafe("070377-281V") 070377-281V >>> // Pic.fromStringUnsafe("foo") would throw an IllegalArgumentException.
a valid String representation of T.
a T object if the input is a valid String representation of T.
scala.IllegalArgumentException
if the input is not a valid String representation of T.
Contains the factory methods for creating objects of class Pic. Follows the "smart constructor" pattern, familiar from Haskell.
Some examples of Pic creation: