Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jboss.portal.common.value
Class Value

    java.lang.Object
      org.jboss.portal.common.value.Value

All Implemented Interfaces:
  java.io.Serializable, java.lang.Cloneable

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 :

storage | mono | multi
--- | --- | ---
xxx | xxx | [xxx]
null | null | [null]
[] | null | []
[null,..] | null | [null,..]
["1",..] | "1" | ["1",..]

Version:
  $Revision: 5451 $
Author:
  Julien Viet
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.
`Value` | `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()

  Overrides:
    `hashCode` in class `java.lang.Object`

### equals

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

  Overrides:
    `equals` in class `java.lang.Object`

### toString

    public final java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

### clone

    public final Value clone()

  Clone this object.

  Overrides:
    `clone` in class `java.lang.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.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD