org.datamixer.collections
Class ValueList

java.lang.Object
  extended byorg.datamixer.collections.DatamixerCollection
      extended byorg.datamixer.collections.DatamixerList
          extended byorg.datamixer.collections.ValueList
All Implemented Interfaces:
java.lang.Cloneable, java.util.Collection, DatamixerListener, java.util.EventListener, java.util.List

public class ValueList
extends DatamixerList
implements DatamixerListener, java.lang.Cloneable


Field Summary
static int ACTION_ADD_VALUE
           
static java.lang.String ACTION_ADD_VALUE_NAME
           
static java.util.List ACTIONS
          action names
protected  java.util.List list_
           
protected  java.util.Map valueMap_
           
 
Fields inherited from class org.datamixer.collections.DatamixerCollection
dataType_, debugEnabled_, formatPattern_, id_, initialized_, logger_, name_, repeat_
 
Constructor Summary
ValueList()
           
 
Method Summary
 java.lang.String actionToString(int action)
          Returns the print name of action
 boolean add(java.lang.Object o)
           
 Value addValue(Value value)
          Adds value to this list.
 java.lang.Object clone()
          Returns a deep copy.
 boolean contains(java.lang.Object o)
          Returns true if this collection contains obj.
 boolean containsAll(java.util.Collection coll)
          Returns true if this collection contains all of the elements in coll.
protected  DatamixerIterator createIterator()
          Returns an iterator over the elements contained in this collection.
protected  java.lang.Object doGet(int index)
           
protected  int doGetSize()
           
protected  void doInitialize()
           
 Value findValue(java.lang.String[] names)
          Locate a nested value by names.
 java.util.List getActions()
          Returns the list of available action names.
 java.util.List getList()
          Adds value to this list.
 Value getValue(int index)
          Returns the element at index, wrapped in a Value.
 Value getValue(java.lang.String name)
          Get value by name.
 java.util.Map getValueMap()
          Adds value to this list.
 void handleDatamixerEvent(DatamixerEvent e)
          Dispatches the event based on the event type and action.
 java.lang.Object[] newArray(int size)
          Returns the elements in this list as an array of length size.
protected  void setList(java.util.List list)
          Adds value to this list.
protected  void setValueMap(java.util.Map map)
          Adds value to this list.
 int stringToAction(java.lang.String s)
          Returns the value of the action named actionName
 java.lang.Object[] toArray()
          Returns an array containing all of the elements in this collection.
 java.lang.Object[] toArray(java.lang.Object[] target)
          Returns an array containing all of the elements in this collection; the runtime type of the returned array is that of target.
 java.lang.String toString()
           
protected  void updateValueMap(Value value)
          Adds value to this list.
 
Methods inherited from class org.datamixer.collections.DatamixerList
add, addAll, get, indexOf, lastIndexOf, listIterator, listIterator, remove, set, subList
 
Methods inherited from class org.datamixer.collections.DatamixerCollection
addAll, clear, error, getDatamixerIterator, getDataType, getFormatPattern, getId, getName, getRepeat, getSize, initialize, isEmpty, iterator, remove, removeAll, retainAll, setDataType, setFormatPattern, setId, setName, setRepeat, size
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
addAll, clear, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size
 

Field Detail

ACTION_ADD_VALUE

public static final int ACTION_ADD_VALUE
See Also:
Constant Field Values

ACTION_ADD_VALUE_NAME

public static final java.lang.String ACTION_ADD_VALUE_NAME
See Also:
Constant Field Values

ACTIONS

public static final java.util.List ACTIONS
action names


list_

protected java.util.List list_

valueMap_

protected java.util.Map valueMap_
Constructor Detail

ValueList

public ValueList()
Method Detail

clone

public java.lang.Object clone()
Returns a deep copy.


toString

public java.lang.String toString()

add

public boolean add(java.lang.Object o)
Specified by:
add in interface java.util.List
Overrides:
add in class DatamixerCollection

contains

public boolean contains(java.lang.Object o)
Description copied from class: DatamixerList
Returns true if this collection contains obj.

Specified by:
contains in interface java.util.List
Overrides:
contains in class DatamixerList

containsAll

public boolean containsAll(java.util.Collection coll)
Description copied from class: DatamixerList
Returns true if this collection contains all of the elements in coll.

Specified by:
containsAll in interface java.util.List
Overrides:
containsAll in class DatamixerList

toArray

public java.lang.Object[] toArray()
Description copied from class: DatamixerList
Returns an array containing all of the elements in this collection.

Specified by:
toArray in interface java.util.List
Overrides:
toArray in class DatamixerList

toArray

public java.lang.Object[] toArray(java.lang.Object[] target)
Description copied from class: DatamixerList
Returns an array containing all of the elements in this collection; the runtime type of the returned array is that of target.

Specified by:
toArray in interface java.util.List
Overrides:
toArray in class DatamixerList

handleDatamixerEvent

public void handleDatamixerEvent(DatamixerEvent e)
                          throws DatamixerException
Dispatches the event based on the event type and action. Currently event type is ignored. The action ACTION_ADD_VALUE calls addValue(Value) with the value in the event.

Specified by:
handleDatamixerEvent in interface DatamixerListener
Throws:
DatamixerException

actionToString

public java.lang.String actionToString(int action)
Returns the print name of action

Specified by:
actionToString in interface DatamixerListener

stringToAction

public int stringToAction(java.lang.String s)
Returns the value of the action named actionName

Specified by:
stringToAction in interface DatamixerListener

getActions

public java.util.List getActions()
Returns the list of available action names.

Specified by:
getActions in interface DatamixerListener

doInitialize

protected void doInitialize()
                     throws DatamixerException
Overrides:
doInitialize in class DatamixerCollection
Throws:
DatamixerException

doGetSize

protected int doGetSize()
Specified by:
doGetSize in class DatamixerCollection

createIterator

protected DatamixerIterator createIterator()
Returns an iterator over the elements contained in this collection.

Specified by:
createIterator in class DatamixerCollection
Returns:
an iterator over the elements contained in this collection.

getValue

public Value getValue(int index)
Description copied from class: DatamixerList
Returns the element at index, wrapped in a Value.

Specified by:
getValue in class DatamixerList

doGet

protected java.lang.Object doGet(int index)
Specified by:
doGet in class DatamixerList

newArray

public java.lang.Object[] newArray(int size)
Description copied from class: DatamixerList
Returns the elements in this list as an array of length size. If size is greater than the length of the list, the additional elements in the array are null.

Specified by:
newArray in class DatamixerList

addValue

public Value addValue(Value value)
Adds value to this list. Returns value.


updateValueMap

protected void updateValueMap(Value value)
Adds value to this list. Returns value.


getList

public java.util.List getList()
Adds value to this list. Returns value.


setList

protected void setList(java.util.List list)
Adds value to this list. Returns value.


getValueMap

public java.util.Map getValueMap()
Adds value to this list. Returns value.


setValueMap

protected void setValueMap(java.util.Map map)
Adds value to this list. Returns value.


getValue

public Value getValue(java.lang.String name)
Get value by name.


findValue

public Value findValue(java.lang.String[] names)
                throws DatamixerException
Locate a nested value by names.

Throws:
DatamixerException


Copyright © 2004-2006 datamixer.org. All Rights Reserved.