com.ricebridge.data.sc
Class ShortArrayStringConverter

java.lang.Object
  extended bycom.ricebridge.data.sc.StringConverterSupport
      extended bycom.ricebridge.data.sc.TypeStringConverter
          extended bycom.ricebridge.data.sc.TypeArrayStringConverter
              extended bycom.ricebridge.data.sc.ShortArrayStringConverter
All Implemented Interfaces:
StringConverter

public class ShortArrayStringConverter
extends TypeArrayStringConverter

Handle short array textual representations.


Field Summary
protected  ShortStringConverter iShortStringConverter
          Use instance of single value converter for actual conversion work.
 
Fields inherited from class com.ricebridge.data.sc.TypeArrayStringConverter
iEscChar, iSepChar, iUseNative
 
Fields inherited from class com.ricebridge.data.sc.TypeStringConverter
iDefault
 
Constructor Summary
ShortArrayStringConverter()
          Create array converter with standard default object.
ShortArrayStringConverter(short pDefault)
          Create array converter with specified default native value.
ShortArrayStringConverter(Short pDefault)
          Create array converter with specified default wrapper object.
 
Method Summary
protected  Object makeArray(List pValues)
          Create an array object from the list of values.
protected  ArrayList makeList(Object pValues)
          Convert an object into a List, if possible.
protected  Object makeTypeObjectImpl(String pValue, boolean pUseDefault)
          Type specific subclasses handle parsing.
 
Methods inherited from class com.ricebridge.data.sc.TypeArrayStringConverter
makeDefaultObjectImpl, makeDefaultStringImpl, makeObjectImpl, makeStringImpl, setDelimiters, setUseNative
 
Methods inherited from class com.ricebridge.data.sc.TypeStringConverter
makeTypeStringImpl, setDefault
 
Methods inherited from class com.ricebridge.data.sc.StringConverterSupport
makeDefaultObject, makeDefaultString, makeObject, makeString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

iShortStringConverter

protected ShortStringConverter iShortStringConverter
Use instance of single value converter for actual conversion work.

Constructor Detail

ShortArrayStringConverter

public ShortArrayStringConverter()
Create array converter with standard default object.


ShortArrayStringConverter

public ShortArrayStringConverter(short pDefault)
Create array converter with specified default native value.

Parameters:
pDefault - default native value

ShortArrayStringConverter

public ShortArrayStringConverter(Short pDefault)
Create array converter with specified default wrapper object.

Parameters:
pDefault - default wrapper value
Method Detail

makeTypeObjectImpl

protected Object makeTypeObjectImpl(String pValue,
                                    boolean pUseDefault)
                             throws Exception
Description copied from class: TypeStringConverter
Type specific subclasses handle parsing.

Specified by:
makeTypeObjectImpl in class TypeStringConverter
Throws:
Exception

makeArray

protected Object makeArray(List pValues)
Description copied from class: TypeArrayStringConverter
Create an array object from the list of values.

If TypeArrayStringConverter.iUseNative is true, then create a native array, else a wrapper object array.

Specified by:
makeArray in class TypeArrayStringConverter
Parameters:
pValues - list of values

makeList

protected ArrayList makeList(Object pValues)
Description copied from class: TypeArrayStringConverter
Convert an object into a List, if possible.

If TypeArrayStringConverter.iUseNative is true, then assume pValues is a native array, else a wrapper object array.

Specified by:
makeList in class TypeArrayStringConverter
Parameters:
pValues - object that should be a list


Copyright © 2004-2005 Ricebridge