Class DTMFTone


  • public final class DTMFTone
    extends Object
    Class for representing all the different DTMF tones.
    Author:
    JM HEITZ
    • Field Detail

      • DTMF_A

        public static final DTMFTone DTMF_A
        The "A" DTMF Tone
      • DTMF_B

        public static final DTMFTone DTMF_B
        The "B" DTMF Tone
      • DTMF_C

        public static final DTMFTone DTMF_C
        The "C" DTMF Tone
      • DTMF_D

        public static final DTMFTone DTMF_D
        The "D" DTMF Tone
      • DTMF_0

        public static final DTMFTone DTMF_0
        The "0" DTMF Tone
      • DTMF_1

        public static final DTMFTone DTMF_1
        The "1" DTMF Tone
      • DTMF_2

        public static final DTMFTone DTMF_2
        The "2" DTMF Tone
      • DTMF_3

        public static final DTMFTone DTMF_3
        The "3" DTMF Tone
      • DTMF_4

        public static final DTMFTone DTMF_4
        The "4" DTMF Tone
      • DTMF_5

        public static final DTMFTone DTMF_5
        The "5" DTMF Tone
      • DTMF_6

        public static final DTMFTone DTMF_6
        The "6" DTMF Tone
      • DTMF_7

        public static final DTMFTone DTMF_7
        The "7" DTMF Tone
      • DTMF_8

        public static final DTMFTone DTMF_8
        The "8" DTMF Tone
      • DTMF_9

        public static final DTMFTone DTMF_9
        The "9" DTMF Tone
      • DTMF_STAR

        public static final DTMFTone DTMF_STAR
        The "*" DTMF Tone
      • DTMF_SHARP

        public static final DTMFTone DTMF_SHARP
        The "#" 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()).
      • getDTMFTone

        public static DTMFTone getDTMFTone​(String value)
        Parses input value and return the corresponding tone. If unknown will return null;
        Parameters:
        value - the input value.
        Returns:
        the corresponding tone, null for unknown.