net.sourceforge.ajaxtags.helpers
Class ValueItem

java.lang.Object
  extended by net.sourceforge.ajaxtags.helpers.AbstractItem
      extended by net.sourceforge.ajaxtags.helpers.ValueItem

public class ValueItem
extends AbstractItem

Holding the data for ValueListXmlBuilder.


Constructor Summary
ValueItem(String tagName, boolean asCData)
          Build a SimpleNode.
ValueItem(String tagName, boolean asCData, String... value)
          Build a SimpleNode.
ValueItem(String tagName, String value, boolean asCData)
          Build a SimpleNode.
 
Method Summary
 void addValue(List<String> values)
          Add values to this ValueItem.
 void addValue(String... values)
          Add values to this ValueItem.
 void addValue(String value)
          Add a value to this ValueItem.
 List<String> getValue()
          The list of values.
 int indexOfValue(String value)
          Try to find the index of value.
 String remove(int index)
          Removes an item at specified index.
 
Methods inherited from class net.sourceforge.ajaxtags.helpers.AbstractItem
clearAttribute, getAttributeKeySet, getAttributeValue, getName, isAsCData, removeAttribute, setAllAttributes, setAllAttributes, setAsCData, setAttributes, setAttributes, setName, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValueItem

public ValueItem(String tagName,
                 boolean asCData)
Build a SimpleNode.

Parameters:
tagName - name
asCData - true if is CDATA or false otherwise

ValueItem

public ValueItem(String tagName,
                 String value,
                 boolean asCData)
Build a SimpleNode.

Parameters:
tagName - name
value - add one value
asCData - true if is CDATA or false otherwise

ValueItem

public ValueItem(String tagName,
                 boolean asCData,
                 String... value)
Build a SimpleNode.

Parameters:
tagName - name
asCData - true if is CDATA or false otherwise
value - a list of values
Method Detail

indexOfValue

public int indexOfValue(String value)
Try to find the index of value.

Parameters:
value - the value to find
Returns:
the index of this value
See Also:
ArrayList.indexOf(Object)

addValue

public void addValue(String... values)
Add values to this ValueItem.

Parameters:
values - the valuevalueitem

addValue

public void addValue(List<String> values)
Add values to this ValueItem.

Parameters:
values - the value

addValue

public void addValue(String value)
Add a value to this ValueItem.

Parameters:
value - the value

remove

public String remove(int index)
Removes an item at specified index.

Parameters:
index - the index to remove
Returns:
the removed item

getValue

public List<String> getValue()
The list of values.

Overrides:
getValue in class AbstractItem
Returns:
the list of values


Copyright © 2005-2010 The Ajaxtags Team. All Rights Reserved.