public final class TelUri extends Object
Represents a URI for encoding telephone numbers.
Example tel URI: tel:+1-212-555-0101
This class is immutable. Use the TelUri.Builder
object to construct a new
instance, or the parse(java.lang.String)
method to parse a tel URI string.
Examples:
TelUri uri = new TelUri.Builder("+1-212-555-0101").extension("123").build(); TelUri uri = TelUri.parse("tel:+1-212-555-0101;ext=123"); TelUri copy = new TelUri.Builder(original).extension("124").build();
Modifier and Type | Class and Description |
---|---|
static class |
TelUri.Builder |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
String |
getExtension()
Gets the extension.
|
String |
getIsdnSubaddress()
Gets the ISDN sub address.
|
String |
getNumber()
Gets the phone number.
|
String |
getParameter(String name)
Gets a parameter value.
|
Map<String,String> |
getParameters()
Gets all parameters.
|
String |
getPhoneContext()
Gets the phone context.
|
int |
hashCode() |
static TelUri |
parse(String uri)
Parses a tel URI.
|
String |
toString()
Converts this tel URI to its string representation.
|
public static TelUri parse(String uri)
uri
- the URIIllegalArgumentException
- if the URI cannot be parsedpublic String getNumber()
public String getPhoneContext()
public String getExtension()
public String getIsdnSubaddress()
public String getParameter(String name)
name
- the parameter namepublic String toString()
This software is published under the BSD license. Copyright © 2003-${build.year}, CRIXP AG, Switzerland, All rights reserved. Use is subject to license terms.