KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > myfaces > util > NullEnumeration


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.util;
17
18 import java.util.Enumeration JavaDoc;
19
20 /**
21  * Enumeration without elements
22  *
23  * @author Anton Koinov (latest modification by $Author: matze $)
24  * @version $Revision: 1.3 $ $Date: 2004/10/13 11:51:01 $
25  * $Log: NullEnumeration.java,v $
26  * Revision 1.3 2004/10/13 11:51:01 matze
27  * renamed packages to org.apache
28  *
29  * Revision 1.2 2004/07/01 22:01:13 mwessendorf
30  * ASF switch
31  *
32  * Revision 1.1 2004/04/15 04:32:58 dave0000
33  * make SessionMap request session every time
34  *
35  *
36  */

37 public final class NullEnumeration implements Enumeration JavaDoc
38 {
39     private static final NullEnumeration s_nullEnumeration = new NullEnumeration();
40
41     public static final NullEnumeration instance()
42     {
43         return s_nullEnumeration;
44     }
45
46     public boolean hasMoreElements()
47     {
48         return false;
49     }
50
51     public Object JavaDoc nextElement()
52     {
53         throw new UnsupportedOperationException JavaDoc("NullEnumeration has no elements");
54     }
55 }
56
Popular Tags