NIST-SIP: The Reference Implementation for JAIN-SIP 1.2

gov.nist.javax.sip.address
Class TelephoneNumber

java.lang.Object
  extended by gov.nist.core.GenericObject
      extended by gov.nist.javax.sip.address.NetObject
          extended by gov.nist.javax.sip.address.TelephoneNumber
All Implemented Interfaces:
Serializable, Cloneable

public class TelephoneNumber
extends NetObject

Telephone number class.

Version:
1.2, 1.2 $Revision: 1.10 $ $Date: 2009/07/17 18:57:23 $
Author:
M. Ranganathan
See Also:
Serialized Form

Field Summary
static String ISUB
           
static String PHONE_CONTEXT_TAG
           
static String POSTDIAL
           
static String PROVIDER_TAG
           
 
Constructor Summary
TelephoneNumber()
          Creates new TelephoneNumber
 
Method Summary
 Object clone()
          Clones this object.
 void deleteParm(String name)
          delete the specified parameter.
 String encode()
          Get the string encoded version of this object
 StringBuffer encode(StringBuffer buffer)
          Put the encoded version of this object in the given StringBuffer.
 String getIsdnSubaddress()
          Get the isdn subaddress for this number.
 String getParameter(String name)
          Returns the value of the named parameter, or null if it is not set.
 Iterator<String> getParameterNames()
          Returns an Iterator over the names (Strings) of all parameters.
 gov.nist.core.NameValueList getParameters()
           
 String getPhoneNumber()
          get the PhoneNumber field
 String getPostDial()
          get the PostDial field
 boolean hasIsdnSubaddress()
          return true if the isdn subaddress exists.
 boolean hasParm(String pname)
          return true if this header has parameters.
 boolean hasPostDial()
          returns true if th PostDial field exists
 boolean isGlobal()
          is a global telephone number.
 void removeIsdnSubaddress()
          Remove the isdn subaddress (if it exists).
 void removeParameter(String parameter)
           
 void removePostDial()
          remove the PostDial field
 void setGlobal(boolean g)
          set the Global field
 void setIsdnSubaddress(String isub)
          set the isdn subaddress for this structure.
 void setParameter(String name, String value)
           
 void setParameters(gov.nist.core.NameValueList p)
          Set the list of parameters.
 void setParm(String name, Object value)
          set the specified parameter
 void setPhoneNumber(String num)
          set the PhoneNumber field
 void setPostDial(String p)
          set the PostDial field
 
Methods inherited from class gov.nist.javax.sip.address.NetObject
debugDump, debugDump, equals, match, toString
 
Methods inherited from class gov.nist.core.GenericObject
getClassFromName, getMatcher, isMySubclass, makeClone, merge, setMatcher
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

POSTDIAL

public static final String POSTDIAL
See Also:
Constant Field Values

PHONE_CONTEXT_TAG

public static final String PHONE_CONTEXT_TAG
See Also:
Constant Field Values

ISUB

public static final String ISUB
See Also:
Constant Field Values

PROVIDER_TAG

public static final String PROVIDER_TAG
See Also:
Constant Field Values
Constructor Detail

TelephoneNumber

public TelephoneNumber()
Creates new TelephoneNumber

Method Detail

deleteParm

public void deleteParm(String name)
delete the specified parameter.

Parameters:
name - String to set

getPhoneNumber

public String getPhoneNumber()
get the PhoneNumber field

Returns:
String

getPostDial

public String getPostDial()
get the PostDial field

Returns:
String

getIsdnSubaddress

public String getIsdnSubaddress()
Get the isdn subaddress for this number.

Returns:
String

hasPostDial

public boolean hasPostDial()
returns true if th PostDial field exists

Returns:
boolean

hasParm

public boolean hasParm(String pname)
return true if this header has parameters.

Parameters:
pname - String to set
Returns:
boolean

hasIsdnSubaddress

public boolean hasIsdnSubaddress()
return true if the isdn subaddress exists.

Returns:
boolean

isGlobal

public boolean isGlobal()
is a global telephone number.

Returns:
boolean

removePostDial

public void removePostDial()
remove the PostDial field


removeIsdnSubaddress

public void removeIsdnSubaddress()
Remove the isdn subaddress (if it exists).


setParameters

public void setParameters(gov.nist.core.NameValueList p)
Set the list of parameters.

Parameters:
p - NameValueList to set

setGlobal

public void setGlobal(boolean g)
set the Global field

Parameters:
g - boolean to set

setPostDial

public void setPostDial(String p)
set the PostDial field

Parameters:
p - String to set

setParm

public void setParm(String name,
                    Object value)
set the specified parameter

Parameters:
name - String to set
value - Object to set

setIsdnSubaddress

public void setIsdnSubaddress(String isub)
set the isdn subaddress for this structure.

Parameters:
isub - String to set

setPhoneNumber

public void setPhoneNumber(String num)
set the PhoneNumber field

Parameters:
num - String to set

encode

public String encode()
Description copied from class: gov.nist.core.GenericObject
Get the string encoded version of this object

Specified by:
encode in class gov.nist.core.GenericObject

encode

public StringBuffer encode(StringBuffer buffer)
Description copied from class: gov.nist.core.GenericObject
Put the encoded version of this object in the given StringBuffer.

Overrides:
encode in class gov.nist.core.GenericObject

getParameter

public String getParameter(String name)
Returns the value of the named parameter, or null if it is not set. A zero-length String indicates flag parameter.

Parameters:
name - name of parameter to retrieve
Returns:
the value of specified parameter

getParameterNames

public Iterator<String> getParameterNames()
Returns an Iterator over the names (Strings) of all parameters.

Returns:
an Iterator over all the parameter names

removeParameter

public void removeParameter(String parameter)

setParameter

public void setParameter(String name,
                         String value)

clone

public Object clone()
Description copied from class: gov.nist.core.GenericObject
Clones this object.

Overrides:
clone in class gov.nist.core.GenericObject

getParameters

public gov.nist.core.NameValueList getParameters()

NIST-SIP: The Reference Implementation for JAIN-SIP 1.2

A product of the NIST/ITL Advanced Networking Technologies Division.
See conditions of use.
Submit a bug report or feature request.