PageRenderTime 11ms CodeModel.GetById 7ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

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