Asterisk-Java

org.asteriskjava.live
Class CallerId

java.lang.Object
  extended by org.asteriskjava.live.CallerId
All Implemented Interfaces:
java.io.Serializable

public class CallerId
extends java.lang.Object
implements java.io.Serializable

Represents a Caller*ID containing name and number.

Objects of this type are immutable.

Since:
0.3
Version:
$Id: CallerId.java 1286 2009-04-04 09:40:40Z srt $
Author:
srt
See Also:
Serialized Form

Constructor Summary
CallerId(java.lang.String name, java.lang.String number)
          Creates a new CallerId.
 
Method Summary
 boolean equals(java.lang.Object o)
           
 java.lang.String getName()
          Returns the Caller*ID name.
 java.lang.String getNumber()
          Returns the the Caller*ID number.
 int hashCode()
           
 java.lang.String toString()
          Returns a string representation of this CallerId in the form "Some Name" <1234>.
static CallerId valueOf(java.lang.String s)
          Parses a caller id string in the form "Some Name" <1234> to a CallerId object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CallerId

public CallerId(java.lang.String name,
                java.lang.String number)
Creates a new CallerId.

Parameters:
name - the Caller*ID name.
number - the Caller*ID number.
Method Detail

getName

public java.lang.String getName()
Returns the Caller*ID name.

Returns:
the Caller*ID name.

getNumber

public java.lang.String getNumber()
Returns the the Caller*ID number.

Returns:
the Caller*ID number.

valueOf

public static CallerId valueOf(java.lang.String s)
Parses a caller id string in the form "Some Name" <1234> to a CallerId object.

Parameters:
s - the caller id string to parse.
Returns:
the corresponding CallerId object which is never null.
See Also:
AstUtil.parseCallerId(String)

toString

public java.lang.String toString()
Returns a string representation of this CallerId in the form "Some Name" <1234>.

Overrides:
toString in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

Asterisk-Java

Copyright © 2004-2009 Stefan Reuter. All Rights Reserved.