KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > portal > server > metadata > PreferenceMetaData


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
10 package org.jboss.portal.server.metadata;
11
12 public class PreferenceMetaData
13 {
14
15    private String JavaDoc name;
16    private String JavaDoc[] values;
17    private boolean readOnly;
18
19    public PreferenceMetaData()
20    {
21    }
22
23    public String JavaDoc getName()
24    {
25       return name;
26    }
27
28    public void setName(String JavaDoc name)
29    {
30       this.name = name;
31    }
32
33    public String JavaDoc[] getValues()
34    {
35       return values;
36    }
37
38    public void setValues(String JavaDoc[] values)
39    {
40       this.values = values;
41    }
42
43    public boolean getReadOnly()
44    {
45       return readOnly;
46    }
47
48    public void setReadOnly(boolean readOnly)
49    {
50       this.readOnly = readOnly;
51    }
52
53    public int hashCode()
54    {
55       return name.hashCode();
56    }
57
58    public boolean equals(Object JavaDoc obj)
59    {
60       if (obj == this)
61       {
62          return true;
63       }
64       if (obj instanceof PreferenceMetaData)
65       {
66          PreferenceMetaData other = (PreferenceMetaData)obj;
67          return other.name.equals(name);
68       }
69       return false;
70    }
71 }
72
Popular Tags