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

AbstractValues - JBOSS Portal 2.4 API 英文版文档


org.jboss.portal.migration.model20.other
Class AbstractValues

java.lang.Object
  extended byorg.jboss.portal.migration.model20.other.AbstractValues
All Implemented Interfaces:
java.io.Serializable, Value
Direct Known Subclasses:
BooleanValues, IntegerValues, StringValues

public abstract class AbstractValues
extends java.lang.Object
implements Value

See Also:
Serialized Form

Constructor Summary
AbstractValues()
           
 
Method Summary
 boolean asBoolean()
          Return the value as a boolean.
 boolean[] asBooleanArray()
          Default implementation throws FormatConversionException.
 int asInt()
          Return the value as an int.
 int[] asIntArray()
          Default implementation throws FormatConversionException.
 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.
 boolean equals(java.lang.Object obj)
           
protected abstract  java.lang.Object[] getObjects()
          Must always return a non null array !!!
 int hashCode()
           
 boolean isMultiValued()
          Return true if it contains more than one value.
 boolean isNull()
          Return true if the value is null.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jboss.portal.migration.model20.other.Value
asString, asStringArray
 

Constructor Detail

AbstractValues

public AbstractValues()
Method Detail

getObjects

protected abstract java.lang.Object[] getObjects()
Must always return a non null array !!!


asInt

public int asInt()
          throws NullConversionException,
                 FormatConversionException
Description copied from interface: Value
Return the value as an int.

Specified by:
asInt in interface Value
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
Description copied from interface: Value
Return the value as a boolean.

Specified by:
asBoolean in interface Value
Throws:
FormatConversionException - if one of the values cannot be converted
NullConversionException - if one of the values is null

isNull

public boolean isNull()
Description copied from interface: Value
Return true if the value is null.

Specified by:
isNull in interface Value

isMultiValued

public boolean isMultiValued()
Description copied from interface: Value
Return true if it contains more than one value.

Specified by:
isMultiValued in interface Value

asIntArray

public int[] asIntArray()
                 throws NullConversionException,
                        FormatConversionException
Default implementation throws FormatConversionException.

Specified by:
asIntArray in interface Value
Throws:
FormatConversionException - if one of the values cannot be converted
NullConversionException - if one of the values is null

asBooleanArray

public boolean[] asBooleanArray()
                         throws NullConversionException,
                                FormatConversionException
Default implementation throws FormatConversionException.

Specified by:
asBooleanArray in interface Value
Throws:
FormatConversionException - if one of the values cannot be converted
NullConversionException - if one of the values is null

hashCode

public int hashCode()

equals

public boolean equals(java.lang.Object obj)

asObjectArray

public java.lang.Object[] asObjectArray()
Description copied from interface: Value
Return the values as an array of converted object.

Specified by:
asObjectArray in interface Value

asObject

public java.lang.Object asObject()
Description copied from interface: Value
Return the value.

Specified by:
asObject in interface Value

asObjectList

public java.util.List asObjectList()
Description copied from interface: Value
Return the values as an immutable collection of converted object or null.

Specified by:
asObjectList in interface Value

toString

public java.lang.String toString()