KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > portal > core > impl > preferences > TypedStringArray


1 /*****************************************
2  * *
3  * JBoss Portal: The OpenSource Portal *
4  * *
5  * Distributable under LGPL license. *
6  * See terms of license at gnu.org. *
7  * *
8  *****************************************/

9 package org.jboss.portal.core.impl.preferences;
10
11 /**
12  * A typed string.
13  *
14  * @author <a HREF="mailto:julien@jboss.org">Julien Viet</a>
15  * @version $Revision: 1.1 $
16  */

17 public class TypedStringArray
18 {
19
20    /** The type. */
21    private final int type;
22
23    /** The strings. */
24    private final String JavaDoc[] strings;
25
26    /**
27     * @throws IllegalArgumentException if strings is null
28     */

29    public TypedStringArray(int type, String JavaDoc[] strings) throws IllegalArgumentException JavaDoc
30    {
31       if (strings == null)
32       {
33          throw new IllegalArgumentException JavaDoc("strings cannot be null");
34       }
35       this.type = type;
36       this.strings = strings;
37    }
38
39    public int getType()
40    {
41       return type;
42    }
43
44    public String JavaDoc[] getStrings()
45    {
46       return strings;
47    }
48 }
49
Popular Tags