org.teleal.cling.model.types.csv
Class CSV<T>

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.ArrayList<T>
              extended by org.teleal.cling.model.types.csv.CSV<T>
All Implemented Interfaces:
Serializable, Cloneable, Iterable<T>, Collection<T>, List<T>, RandomAccess
Direct Known Subclasses:
CSVBoolean, CSVBytes, CSVCharacter, CSVDate, CSVDouble, CSVFloat, CSVInteger, CSVShort, CSVString, CSVUnsignedIntegerFourBytes, CSVUnsignedIntegerOneByte, CSVUnsignedIntegerTwoBytes, CSVURI

public abstract class CSV<T>
extends ArrayList<T>

Transforms a state variable value from/to strings of comma-separated elements.

A concrete implementation of this interface knows how to transform values of the declared type into a string of comma-separated list of elements, and how to read such strings back into individual values.

Your action method returns a CSV<...> instance as an output argument. It can also accept a concrecte subclass of this type as an input argument, e.g. CSVString. This type extends a regular List, so within your action method you can handle the elements as usual.

Author:
Christian Bauer
See Also:
Serialized Form

Field Summary
protected  Datatype.Builtin datatype
           
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
CSV()
           
CSV(String s)
           
 
Method Summary
protected  Datatype.Builtin getBuiltinDatatype()
           
protected  List parseString(String s)
           
 String toString()
           
 
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeRange, set, size, toArray, toArray, trimToSize
 
Methods inherited from class java.util.AbstractList
equals, hashCode, iterator, listIterator, listIterator, subList
 
Methods inherited from class java.util.AbstractCollection
containsAll, removeAll, retainAll
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
containsAll, equals, hashCode, iterator, listIterator, listIterator, removeAll, retainAll, subList
 

Field Detail

datatype

protected final Datatype.Builtin datatype
Constructor Detail

CSV

public CSV()

CSV

public CSV(String s)
    throws InvalidValueException
Throws:
InvalidValueException
Method Detail

parseString

protected List parseString(String s)
                    throws InvalidValueException
Throws:
InvalidValueException

getBuiltinDatatype

protected Datatype.Builtin getBuiltinDatatype()
                                       throws InvalidValueException
Throws:
InvalidValueException

toString

public String toString()
Overrides:
toString in class AbstractCollection<T>


Copyright © 2010 Teleal GmbH, Switzerland. All Rights Reserved.