public class GsmAddress extends Address implements java.lang.Cloneable, java.io.Serializable
A GSM address consist of 3 fields:
Modifier and Type | Field and Description |
---|---|
static byte |
NPI_ERMES
Numbering plan: ERMES (ETSI DE/PS3 01-3)
|
static byte |
NPI_NATIONAL
Numbering plan: National
|
static byte |
NPI_PHONE
Numbering plan: ISDN/telephone (E.164/E.163)
|
static byte |
NPI_PRIVATE
Numbering plan: Private
|
static byte |
NPI_TELEX
Numbering plan: Telex (F.69)
|
static byte |
NPI_UNKNOWN
Numbering plan: Unknown
|
static byte |
NPI_X121
Numbering plan: Data (X.121)
|
static byte |
TON_ABBREVIATED
Type of number: Abbreviated
|
static byte |
TON_ALPHANUMERIC
Type of number: Alphanumeric
|
static byte |
TON_INTERNATIONAL
Type of number: International
|
static byte |
TON_NATIONAL
Type of number: National
|
static byte |
TON_NETWORK_SPECIFIC
Type of number: Network specific
|
static byte |
TON_SUBSCRIBER_NUMBER
Type of number: Subscriber number
|
static byte |
TON_UNKNOWN
Type of number: Unknown
|
Constructor and Description |
---|
GsmAddress(java.lang.String address)
Construct a new GsmAddress.
|
GsmAddress(java.lang.String address,
byte TON,
byte NPI)
Construct a new GsmAddress.
|
Modifier and Type | Method and Description |
---|---|
byte |
getNPI()
Returns the Numbering-plan-identification (NPI).
|
byte |
getTON()
Returns the type of Number (TON).
|
java.lang.String |
toString()
Returns a string representation of the address.
|
equals, getAddress, hashCode
public static final byte TON_UNKNOWN
public static final byte TON_INTERNATIONAL
public static final byte TON_NATIONAL
public static final byte TON_NETWORK_SPECIFIC
public static final byte TON_SUBSCRIBER_NUMBER
public static final byte TON_ALPHANUMERIC
public static final byte TON_ABBREVIATED
public static final byte NPI_UNKNOWN
public static final byte NPI_PHONE
public static final byte NPI_X121
public static final byte NPI_TELEX
public static final byte NPI_NATIONAL
public static final byte NPI_PRIVATE
public static final byte NPI_ERMES
public GsmAddress(java.lang.String address)
NPI_PHONE
. If the address contains non-numeric
characters, the type of number (TON) will be set to TON_ALPHANUMERIC
.
Otherwise, if the address starts with a leading '+', the TON is set to
TON_INTERNATIONAL
if no leading '+' is present, the TON is set
to TON_UNKNOWN
.address
- the Address (e.g. "+4179123456")public GsmAddress(java.lang.String address, byte TON, byte NPI) throws java.lang.IllegalArgumentException
address
- the address.TON
- type of Number (TON)NPI
- Numbering-plan-identification (NPI).java.lang.IllegalArgumentException
- if address is null.object XP, Inc. © 2000-2013. All rights reserved object XP