org.jboss.portal.common.value
Class StringValues

java.lang.Object
  extended by org.jboss.portal.common.value.AbstractValues
      extended by org.jboss.portal.common.value.StringValues
All Implemented Interfaces:
java.io.Serializable, Value

public class StringValues
extends AbstractValues

See Also:
Serialized Form

Constructor Summary
StringValues()
           
StringValues(java.lang.String value)
           
StringValues(java.lang.String[] values)
           
 
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.String asString()
          Return the value as a string.
 java.lang.String[] asStringArray()
          Return the values as an array of string.
protected  java.lang.Object[] getObjects()
          Must always return a non null array !!!
 
Methods inherited from class org.jboss.portal.common.value.AbstractValues
asObject, asObjectArray, asObjectList, equals, hashCode, isMultiValued, isNull, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StringValues

public StringValues(java.lang.String[] values)

StringValues

public StringValues(java.lang.String value)

StringValues

public StringValues()
Method Detail

asString

public java.lang.String asString()
Description copied from interface: Value
Return the value as a string.


asInt

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

Specified by:
asInt in interface Value
Overrides:
asInt in class AbstractValues
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
Overrides:
asBoolean in class AbstractValues
Throws:
NullConversionException - if one of the values is null
FormatConversionException - if one of the values cannot be converted

asStringArray

public java.lang.String[] asStringArray()
Description copied from interface: Value
Return the values as an array of string.


asIntArray

public int[] asIntArray()
                 throws NullConversionException,
                        FormatConversionException
Description copied from class: AbstractValues
Default implementation throws FormatConversionException.

Specified by:
asIntArray in interface Value
Overrides:
asIntArray in class AbstractValues
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
Description copied from class: AbstractValues
Default implementation throws FormatConversionException.

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

getObjects

protected java.lang.Object[] getObjects()
Description copied from class: AbstractValues
Must always return a non null array !!!

Specified by:
getObjects in class AbstractValues