站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBOSS Portal 2.4 API 英文版文档

Value - JBOSS Portal 2.4 API 英文版文档


org.jboss.portal.common.value
Class Value

java.lang.Object
  extended byorg.jboss.portal.common.value.Value
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable
Direct Known Subclasses:
BooleanValue, FloatValue, IntegerValue, StringValue

public abstract class Value
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable

A read only interface used to retrieve data. It represents both for mono value and multi values. It must implement equals and hashCode.

The semantics :

storagemonomulti
xxxxxx[xxx]
nullnull[null]
[]null[]
[null,..]null[null,..]
["1",..]"1"["1",..]

See Also:
Serialized Form

Constructor Summary
Value()
           
 
Method Summary
 java.lang.Object asObject()
          Return the value.
 java.lang.Object[] asObjectArray()
          Create a new array and fill it with the values.
 java.util.List asObjectList()
          Return an immutable list of objects.
 java.lang.String asString()
          Return the value as a string or null if the value is null.
 java.lang.String[] asStringArray()
          Creates a new array and fill it with the string values.
 java.util.List asStringList()
          Return an immutable list of strings.
 java.lang.Object clone()
          Clone this object.
 boolean equals(java.lang.Object obj)
           
protected abstract  java.lang.Object[] getObjectArray()
          Return the values as an array of converted object.
 int hashCode()
           
 boolean isEmpty()
          Return true if it contains zero value.
abstract  boolean isInstanceOf(java.lang.Class clazz)
           
 boolean isMultiValued()
          Return true if it contains more than one value.
 boolean isNull()
          Return true if the value is null.
 int size()
          Return the size.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Value

public Value()
Method Detail

isInstanceOf

public abstract boolean isInstanceOf(java.lang.Class clazz)

hashCode

public final int hashCode()

equals

public final boolean equals(java.lang.Object obj)

toString

public final java.lang.String toString()

clone

public final java.lang.Object clone()
Clone this object.

Returns:
a clone of this object

isNull

public final boolean isNull()
Return true if the value is null.


asString

public final java.lang.String asString()
Return the value as a string or null if the value is null.


asObject

public final java.lang.Object asObject()
Return the value.


isMultiValued

public final boolean isMultiValued()
Return true if it contains more than one value.


isEmpty

public final boolean isEmpty()
Return true if it contains zero value.


size

public final int size()
Return the size.


asStringArray

public final java.lang.String[] asStringArray()
Creates a new array and fill it with the string values.


asObjectArray

public final java.lang.Object[] asObjectArray()
Create a new array and fill it with the values.


asStringList

public final java.util.List asStringList()
Return an immutable list of strings.


asObjectList

public final java.util.List asObjectList()
Return an immutable list of objects.


getObjectArray

protected abstract java.lang.Object[] getObjectArray()
Return the values as an array of converted object. It must always return a non null array.