/protocols/jain-megaco/megaco-api/src/main/java/javax/megaco/message/descriptor/DigitMapString.java

http://mobicents.googlecode.com/ · Java · 68 lines · 20 code · 11 blank · 37 comment · 2 complexity · f73860ffd88955b7e321aaeb13545eea MD5 · raw file

  1. package javax.megaco.message.descriptor;
  2. import java.io.Serializable;
  3. /**
  4. * The DigitMapString object is a class that shall be used to set the digit
  5. * string in digit map within the digit map descriptor. This is an independent
  6. * class derived from java.util.Object and shall not have any derived classes.
  7. * Each digit string object in turn stores a vector of DigitPosition object
  8. * references. The DigitPosition object specifies the combination of digits that
  9. * can be present at a position in the digit string.
  10. */
  11. public class DigitMapString implements Serializable {
  12. private DigitStringPosition[] digitStringPosition = null;
  13. /**
  14. * Constructs a Digit Map String Object. This shall contain information
  15. * about the digit string in the digit plan.
  16. */
  17. public DigitMapString() {
  18. super();
  19. }
  20. /**
  21. * The method is used to get the vector of the digit position object
  22. * references. Each of these digit positions represents digits with values
  23. * between 1-9 and A-K, L, S or Z. The index of the vector
  24. * DigitStringPosition gives the position for which the position object is
  25. * specifying the digits.
  26. *
  27. * @return The vector specifying the digit combinations that can occur at
  28. * each digit position for the current digit string in a digit plan.
  29. * If no value for digit position is specified, then this method
  30. * will return NULL.
  31. */
  32. public DigitStringPosition[] getDigitStringPosition() {
  33. return this.digitStringPosition;
  34. }
  35. /**
  36. * The method sets the vector of the object identifier for the digit
  37. * positions. Each of the vector element specifies digits that are valid for
  38. * each digit position within one digit string. The index of the vector
  39. * DigitStringPosition gives the position for which the position object is
  40. * specifying the digits.
  41. *
  42. * @param digitPositions
  43. * The vector of the object identifer of the digit positions.
  44. * @throws IllegalArgumentException
  45. * : This exception is raised if the reference of Digit String
  46. * Position passed to this method is NULL.
  47. */
  48. public void setDigitStringPosition(DigitStringPosition[] digitPositions) throws IllegalArgumentException {
  49. if (digitPositions == null) {
  50. throw new IllegalArgumentException("DigitStringPosition[] must not be null.");
  51. }
  52. this.digitStringPosition = digitPositions;
  53. }
  54. public java.lang.String toString() {
  55. return super.toString();
  56. }
  57. }