|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectezvcard.util.TelUri.Builder
public static class TelUri.Builder
| Constructor Summary | |
|---|---|
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. |
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
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 rules
public 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(TelUri original)
TelUri builder.
original - the TelUri object to copy from| Method Detail |
|---|
public 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 rules
public 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 remove
IllegalArgumentException - 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 remove
public 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 it
IllegalArgumentException - if the parameter name contains
invalid characterspublic TelUri build()
TelUri object.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||