org.oddjob.values.types
Class ListType

java.lang.Object
  extended byorg.oddjob.values.types.ListType
Direct Known Subclasses:
MergeListProxy

public class ListType
extends java.lang.Object

Description:
A list can list any other type including another list.

If the merge property is set to true then sub lists are merged with the main list. This feature is currently unsupported in Oddjob Designer.

Example:
 <list>
   <value value="Hello World"/>
   <value value="Goodbye World"/>
   <list>
     <value value="42"/>
   </list>
 </list>
 
Author:
Rob Gordon.

Constructor Summary
ListType()
           
 
Method Summary
 void addConfiguredValue(java.lang.Object type)
          Add a value to the list.
 ArooaHandler handlerFor(ArooaContext context)
          Provide our own handler for the values.
 boolean isMerge()
           
 void setMerge(boolean merge)
           
 java.lang.String toString()
           
 java.lang.Object valueFor(java.lang.Class required)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ListType

public ListType()
Method Detail

addConfiguredValue

public void addConfiguredValue(java.lang.Object type)
Add a value to the list.

Parameters:
type - The type.

valueFor

public java.lang.Object valueFor(java.lang.Class required)
                          throws java.lang.ClassCastException,
                                 java.lang.NumberFormatException
Throws:
java.lang.ClassCastException
java.lang.NumberFormatException

toString

public java.lang.String toString()

handlerFor

public ArooaHandler handlerFor(ArooaContext context)
Provide our own handler for the values.

Parameters:
context - Not required.
Returns:
Our handler.

isMerge

public boolean isMerge()
Returns:
Returns the merge.

setMerge

public void setMerge(boolean merge)
Parameters:
merge - The merge to set.