| Constructor and Description |
|---|
TelUri.Builder(String globalNumber)
Initializes the builder with a global telephone number.
|
TelUri.Builder(String localNumber,
String phoneContext)
Initializes the builder with a local telephone number.
|
TelUri.Builder(TelUri original)
Creates a new
TelUri builder. |
| Modifier and Type | Method and Description |
|---|---|
TelUri |
build()
Builds the final
TelUri object. |
TelUri.Builder |
extension(String extension)
Sets the extension.
|
TelUri.Builder |
globalNumber(String globalNumber)
Sets the telephone number as a global number.
|
TelUri.Builder |
isdnSubaddress(String isdnSubaddress)
Sets the ISDN sub address.
|
TelUri.Builder |
localNumber(String localNumber,
String phoneContext)
Sets the telephone number as a local number.
|
TelUri.Builder |
parameter(String name,
String value)
Adds a parameter.
|
public TelUri.Builder(String globalNumber)
Initializes the builder with a global telephone number.
Global telephone numbers must:
0-9 (digits)- (hypen). (period)( (opening paraenthesis)) (closing paraenthesis)globalNumber - the telephone number (e.g. "+1-212-555-0101")IllegalArgumentException - if the given telephone number does
not adhere to the above rulespublic TelUri.Builder(String localNumber, String phoneContext)
Initializes the builder with a local telephone number. Note, however, that the global format is preferred.
Local telephone numbers must:
0-9 (digit)* (asterisk)# (hash)0-9 (digits)- (hypen). (period)( (opening paraenthesis)) (closing paraenthesis)* (asterisk)# (hash)localNumber - the telephone number (e.g. "7042")phoneContext - the context under which the local number is valid
(e.g. "example.com")IllegalArgumentException - if the given telephone number does
not adhere to the above rulespublic TelUri.Builder globalNumber(String globalNumber)
Sets the telephone number as a global number.
Global telephone numbers must:
0-9 (digits)- (hypen). (period)( (opening paraenthesis)) (closing paraenthesis)globalNumber - the telephone number (e.g. "+1-212-555-0101")IllegalArgumentException - if the given telephone number does
not adhere to the above rulespublic TelUri.Builder localNumber(String localNumber, String phoneContext)
Sets the telephone number as a local number. Note, however, that the global format is preferred.
Local telephone numbers must:
0-9 (digit)* (asterisk)# (hash)0-9 (digits)- (hypen). (period)( (opening paraenthesis)) (closing paraenthesis)* (asterisk)# (hash)localNumber - the telephone number (e.g. "7042")phoneContext - the context under which the local number is valid
(e.g. "example.com")IllegalArgumentException - if the given telephone number does
not adhere to the above rulespublic TelUri.Builder extension(String extension)
extension - the extension (e.g. "101") or null to removeIllegalArgumentException - if the extension contains characters
other than the following: digits, hypens, parenthesis, periodspublic TelUri.Builder isdnSubaddress(String isdnSubaddress)
isdnSubaddress - the ISDN sub address or null to removepublic TelUri.Builder parameter(String name, String value)
name - the parameter name (can only contain letters, numbers,
and hyphens)value - the parameter value or null to remove itIllegalArgumentException - if the parameter name contains
invalid charactersThis software is published under the BSD license. Copyright © 2003-${build.year}, CRIXP AG, Switzerland, All rights reserved. Use is subject to license terms.