Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.service.neomedia
Class DTMFRtpTone

java.lang.Object
  extended by net.java.sip.communicator.service.neomedia.DTMFRtpTone

public final class DTMFRtpTone
extends Object

Represents all DTMF tones for RTP method (RFC4733).

Author:
JM HEITZ, Romain Philibert, Emil Ivov

Field Summary
static DTMFRtpTone DTMF_0
          The "0" DTMF Tone
static DTMFRtpTone DTMF_1
          The "1" DTMF Tone
static DTMFRtpTone DTMF_2
          The "2" DTMF Tone
static DTMFRtpTone DTMF_3
          The "3" DTMF Tone
static DTMFRtpTone DTMF_4
          The "4" DTMF Tone
static DTMFRtpTone DTMF_5
          The "5" DTMF Tone
static DTMFRtpTone DTMF_6
          The "6" DTMF Tone
static DTMFRtpTone DTMF_7
          The "7" DTMF Tone
static DTMFRtpTone DTMF_8
          The "8" DTMF Tone
static DTMFRtpTone DTMF_9
          The "9" DTMF Tone
static DTMFRtpTone DTMF_A
          The "A" DTMF Tone
static DTMFRtpTone DTMF_B
          The "B" DTMF Tone
static DTMFRtpTone DTMF_C
          The "C" DTMF Tone
static DTMFRtpTone DTMF_D
          The "D" DTMF Tone
static DTMFRtpTone DTMF_SHARP
          The "#" DTMF Tone
static DTMFRtpTone DTMF_STAR
          The "*" DTMF Tone
 
Method Summary
 boolean equals(Object target)
          Indicates whether some other object is "equal to" this tone.
 byte getCode()
          Returns the RFC 4733 code of this DTMF tone.
 String getValue()
          Returns the string representation of this DTMF tone.
 int hashCode()
          Returns a hash code value for the object.
static DTMFRtpTone mapTone(DTMFTone tone)
          Maps between protocol and media DTMF objects.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DTMF_0

public static final DTMFRtpTone DTMF_0
The "0" DTMF Tone


DTMF_1

public static final DTMFRtpTone DTMF_1
The "1" DTMF Tone


DTMF_2

public static final DTMFRtpTone DTMF_2
The "2" DTMF Tone


DTMF_3

public static final DTMFRtpTone DTMF_3
The "3" DTMF Tone


DTMF_4

public static final DTMFRtpTone DTMF_4
The "4" DTMF Tone


DTMF_5

public static final DTMFRtpTone DTMF_5
The "5" DTMF Tone


DTMF_6

public static final DTMFRtpTone DTMF_6
The "6" DTMF Tone


DTMF_7

public static final DTMFRtpTone DTMF_7
The "7" DTMF Tone


DTMF_8

public static final DTMFRtpTone DTMF_8
The "8" DTMF Tone


DTMF_9

public static final DTMFRtpTone DTMF_9
The "9" DTMF Tone


DTMF_STAR

public static final DTMFRtpTone DTMF_STAR
The "*" DTMF Tone


DTMF_SHARP

public static final DTMFRtpTone DTMF_SHARP
The "#" DTMF Tone


DTMF_A

public static final DTMFRtpTone DTMF_A
The "A" DTMF Tone


DTMF_B

public static final DTMFRtpTone DTMF_B
The "B" DTMF Tone


DTMF_C

public static final DTMFRtpTone DTMF_C
The "C" DTMF Tone


DTMF_D

public static final DTMFRtpTone DTMF_D
The "D" DTMF Tone

Method Detail

getValue

public String getValue()
Returns the string representation of this DTMF tone.

Returns:
the String representation of this DTMF tone.

equals

public boolean equals(Object target)
Indicates whether some other object is "equal to" this tone.

Overrides:
equals in class Object
Parameters:
target - the reference object with which to compare.
Returns:
true if target represents the same tone as this object.

hashCode

public int hashCode()
Returns a hash code value for the object. This method is supported for the benefit of hashtables such as those provided by java.util.Hashtable. The method would actually return the hashcode of the string representation of this DTMF tone.

Overrides:
hashCode in class Object
Returns:
a hash code value for this object (same as calling getValue().hashCode()).

getCode

public byte getCode()
Returns the RFC 4733 code of this DTMF tone.

Returns:
the RFC 4733 code of this DTMF tone.

mapTone

public static DTMFRtpTone mapTone(DTMFTone tone)
Maps between protocol and media DTMF objects.

Parameters:
tone - The DTMFTone to be mapped to an DTMFRtpTone.
Returns:
The DTMFRtpTone corresponding to the tone specified.

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.