com.silverpeas.util.csv
Class Variant

java.lang.Object
  extended by com.silverpeas.util.csv.Variant

public final class Variant
extends Object


Field Summary
protected  String[] m_asValue
           
protected  boolean m_bValue
           
protected  Date m_dValue
           
protected  float m_fValue
           
protected  int m_iValue
           
protected  long m_lValue
           
protected  String m_sValue
           
protected  String m_type
           
static String TYPE_BOOLEAN
           
static String TYPE_DATEFR
           
static String TYPE_DATEUS
           
static String TYPE_FLOAT
           
static String TYPE_INT
           
static String TYPE_LONG
           
static String TYPE_STRING
           
static String TYPE_STRING_ARRAY
           
 
Constructor Summary
Variant(String[] values, String type)
           
Variant(String value, String type)
           
 
Method Summary
 String getDefaultType()
           
 boolean getValueBoolean()
           
 Date getValueDate()
           
 float getValueFloat()
           
 int getValueInteger()
           
 long getValueLong()
           
 String getValueString()
           
 String[] getValueStringArray()
           
static boolean isArrayType(String type)
           
protected  boolean setValueBoolean(String value)
           
protected  Date setValueDate(String value)
           
protected  float setValueFloat(String value)
           
protected  int setValueInteger(String value)
           
protected  long setValueLong(String value)
           
protected  String[] setValueStringArray(String[] asValue)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TYPE_STRING

public static final String TYPE_STRING
See Also:
Constant Field Values

TYPE_INT

public static final String TYPE_INT
See Also:
Constant Field Values

TYPE_BOOLEAN

public static final String TYPE_BOOLEAN
See Also:
Constant Field Values

TYPE_FLOAT

public static final String TYPE_FLOAT
See Also:
Constant Field Values

TYPE_DATEFR

public static final String TYPE_DATEFR
See Also:
Constant Field Values

TYPE_DATEUS

public static final String TYPE_DATEUS
See Also:
Constant Field Values

TYPE_STRING_ARRAY

public static final String TYPE_STRING_ARRAY
See Also:
Constant Field Values

TYPE_LONG

public static final String TYPE_LONG
See Also:
Constant Field Values

m_type

protected String m_type

m_asValue

protected String[] m_asValue

m_sValue

protected String m_sValue

m_iValue

protected int m_iValue

m_bValue

protected boolean m_bValue

m_fValue

protected float m_fValue

m_dValue

protected Date m_dValue

m_lValue

protected long m_lValue
Constructor Detail

Variant

public Variant(String value,
               String type)
        throws UtilException
Throws:
UtilException

Variant

public Variant(String[] values,
               String type)
Method Detail

isArrayType

public static boolean isArrayType(String type)

getDefaultType

public String getDefaultType()

getValueStringArray

public String[] getValueStringArray()

getValueString

public String getValueString()

getValueInteger

public int getValueInteger()

getValueLong

public long getValueLong()

getValueBoolean

public boolean getValueBoolean()

getValueFloat

public float getValueFloat()

getValueDate

public Date getValueDate()

setValueStringArray

protected String[] setValueStringArray(String[] asValue)

setValueInteger

protected int setValueInteger(String value)
                       throws UtilException
Throws:
UtilException

setValueLong

protected long setValueLong(String value)
                     throws UtilException
Throws:
UtilException

setValueBoolean

protected boolean setValueBoolean(String value)
                           throws UtilException
Throws:
UtilException

setValueFloat

protected float setValueFloat(String value)
                       throws UtilException
Throws:
UtilException

setValueDate

protected Date setValueDate(String value)
                     throws UtilException
Throws:
UtilException


Copyright © 2016 Silverpeas. All Rights Reserved.