KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > portal > common > value > NullValue


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.common.value;
10
11 /**
12  * @author <a HREF="mailto:julien@jboss.org">Julien Viet</a>
13  * @version $Revision: 1.1.1.1 $
14  */

15 public class NullValue extends AbstractValue
16 {
17
18    public static final NullValue INSTANCE = new NullValue();
19
20    private NullValue()
21    {
22    }
23
24    public String JavaDoc asString()
25    {
26       return null;
27    }
28
29    public Object JavaDoc asObject()
30    {
31       return null;
32    }
33
34    public Object JavaDoc[] asObjectArray()
35    {
36       return new Object JavaDoc[0];
37    }
38
39    private Object JavaDoc readResolve()
40    {
41       return INSTANCE;
42    }
43 }
44
Popular Tags