KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > myfaces > config > impl > digester > elements > ListEntries


1 /*
2  * Copyright 2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package org.apache.myfaces.config.impl.digester.elements;
17
18 import java.util.ArrayList JavaDoc;
19 import java.util.List JavaDoc;
20 import java.util.Iterator JavaDoc;
21
22
23 /**
24  * @author <a HREF="mailto:oliver@rossmueller.com">Oliver Rossmueller</a>
25  */

26 public class ListEntries implements org.apache.myfaces.config.element.ListEntries
27 {
28
29     private String JavaDoc valueClass;
30     private List JavaDoc entries = new ArrayList JavaDoc();
31
32
33     public String JavaDoc getValueClass()
34     {
35         return valueClass;
36     }
37
38
39     public void setValueClass(String JavaDoc valueClass)
40     {
41         this.valueClass = valueClass;
42     }
43
44
45
46     public void addEntry(Entry entry)
47     {
48         entries.add(entry);
49     }
50
51
52     public Iterator JavaDoc getListEntries()
53     {
54         return entries.iterator();
55     }
56
57
58     public static class Entry implements org.apache.myfaces.config.element.ListEntry {
59         private boolean nullValue;
60         private String JavaDoc value;
61
62
63         public boolean isNullValue()
64         {
65             return nullValue;
66         }
67
68
69         public void setNullValue()
70         {
71             this.nullValue = true;
72         }
73
74
75         public String JavaDoc getValue()
76         {
77             return value;
78         }
79
80
81         public void setValue(String JavaDoc value)
82         {
83             this.value = value;
84         }
85     }
86 }
87
Popular Tags