/** * Returns a CountryCode instance representing the specified String value * * @param stringValue * a String value * @return return a CountryCode instance representing stringValue * @throws IllegalArgumentException if the given argument is not a valid CountryCode */ public static CountryCode valueOf(String stringValue) throws IllegalArgumentException { return new CountryCode(stringValue); }
/** * Construct CountryCode by the parsing the given string * * @param countryCode * The String to be parsed into CountryCode * @throws IllegalArgumentException if the given argument is not a valid CountryCode */ public CountryCode(String countryCode) throws IllegalArgumentException { if (!isValid(countryCode)) { throw new IllegalArgumentException("parameter is invalid for datatype CountryCode"); } // validate 'token' type which is defined in W3C schema // http://www.w3.org/TR/xmlschema-2/#token if (!W3CSchemaType.isValid("token", countryCode)) { throw new IllegalArgumentException("parameter is invalid for datatype CountryCode"); } mCountryCode = countryCode; }
/** * Construct CountryCode by the parsing the given string * * @param countryCode * The String to be parsed into CountryCode * @throws IllegalArgumentException if the given argument is not a valid CountryCode */ public CountryCode(String countryCode) throws IllegalArgumentException { if (!isValid(countryCode)) { throw new IllegalArgumentException("parameter is invalid for datatype CountryCode"); } // validate 'token' type which is defined in W3C schema // http://www.w3.org/TR/xmlschema-2/#token if (!W3CSchemaType.isValid("token", countryCode)) { throw new IllegalArgumentException("parameter is invalid for datatype CountryCode"); } mCountryCode = countryCode; }
/** * Returns a CountryCode instance representing the specified String value * * @param stringValue * a String value * @return return a CountryCode instance representing stringValue * @throws IllegalArgumentException if the given argument is not a valid CountryCode */ public static CountryCode valueOf(String stringValue) throws IllegalArgumentException { return new CountryCode(stringValue); }
/** * Construct CountryCode by the parsing the given string * * @param countryCode * The String to be parsed into CountryCode * @throws IllegalArgumentException if the given argument is not a valid CountryCode */ public CountryCode(String countryCode) throws IllegalArgumentException { if (!isValid(countryCode)) { throw new IllegalArgumentException("parameter is invalid for datatype CountryCode"); } // validate 'token' type which is defined in W3C schema // http://www.w3.org/TR/xmlschema-2/#token if (!W3CSchemaType.isValid("token", countryCode)) { throw new IllegalArgumentException("parameter is invalid for datatype CountryCode"); } mCountryCode = countryCode; }
/** * Returns a CountryCode instance representing the specified String value * * @param stringValue * a String value * @return return a CountryCode instance representing stringValue * @throws IllegalArgumentException if the given argument is not a valid CountryCode */ public static CountryCode valueOf(String stringValue) throws IllegalArgumentException { return new CountryCode(stringValue); }