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

Value - JBOSS Portal 2.6 API 英文版文档


org.jboss.portal.migration.model20.other
Interface Value

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
AbstractValue, AbstractValues

public interface Value
extends java.io.Serializable

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 : | Storage | mono | multi | | xxx | xxx | [xxx] | | null | null | [null] | -------------------------------- | [] | null | [] | | [null,..] | null | [null,..] | | ["1",..] | "1" | ["1",..] |

Version:
$Revision: 5449 $
Author:
Julien Viet

Method Summary
 boolean asBoolean()
          Return the value as a boolean.
 boolean[] asBooleanArray()
          Return the values as an array of boolean.
 int asInt()
          Return the value as an int.
 int[] asIntArray()
          Return the values as an array of int.
 java.lang.Object asObject()
          Return the value.
 java.lang.Object[] asObjectArray()
          Return the values as an array of converted object.
 java.util.List asObjectList()
          Return the values as an immutable collection of converted object or null.
 java.lang.String asString()
          Return the value as a string.
 java.lang.String[] asStringArray()
          Return the values as an array of string.
 boolean isMultiValued()
          Return true if it contains more than one value.
 boolean isNull()
          Return true if the value is null.
 

Method Detail

isNull

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


asString

public java.lang.String asString()
Return the value as a string.


asInt

public int asInt()
          throws NullConversionException,
                 FormatConversionException
Return the value as an int.

Throws:
NullConversionException - if one of the values is null
FormatConversionException - if one of the values cannot be converted

asBoolean

public boolean asBoolean()
                  throws NullConversionException,
                         FormatConversionException
Return the value as a boolean.

Throws:
NullConversionException - if one of the values is null
FormatConversionException - if one of the values cannot be converted

asObject

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


isMultiValued

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


asStringArray

public java.lang.String[] asStringArray()
Return the values as an array of string.


asIntArray

public int[] asIntArray()
                 throws NullConversionException,
                        FormatConversionException
Return the values as an array of int.

Throws:
NullConversionException - if one of the values is null
FormatConversionException - if one of the values cannot be converted

asBooleanArray

public boolean[] asBooleanArray()
                         throws NullConversionException,
                                FormatConversionException
Return the values as an array of boolean.

Throws:
NullConversionException - if one of the values is null
FormatConversionException - if one of the values cannot be converted

asObjectArray

public java.lang.Object[] asObjectArray()
Return the values as an array of converted object.


asObjectList

public java.util.List asObjectList()
Return the values as an immutable collection of converted object or null.