org.openbandy.io
Class ValueContainer

java.lang.Object
  extended by org.openbandy.io.ValueContainer
Direct Known Subclasses:
StorageValueContainer, StreamValueContainer

public abstract class ValueContainer
extends java.lang.Object


Field Summary
static java.lang.String FALSE
           
static java.lang.String TRUE
           
 
Constructor Summary
ValueContainer()
           
 
Method Summary
 void addBoolean(java.lang.String name, boolean value)
           
 void addByte(java.lang.String name, byte value)
           
 void addChar(java.lang.String name, char value)
           
 void addDouble(java.lang.String name, double value)
           
 void addFloat(java.lang.String name, float value)
           
 void addInt(java.lang.String name, int value)
           
 void addLong(java.lang.String name, long value)
           
 void addShort(java.lang.String name, short value)
           
abstract  void addString(java.lang.String name, java.lang.String value)
           
 void addTimestamp(java.lang.String name, long value)
           
 boolean getBoolean(java.lang.String name)
           
 byte getByte(java.lang.String name)
           
 char getChar(java.lang.String name)
           
 double getDouble(java.lang.String name)
           
 float getFloat(java.lang.String name)
           
 int getInt(java.lang.String name)
           
 long getLong(java.lang.String name)
           
 short getShort(java.lang.String name)
           
abstract  java.lang.String getString(java.lang.String name)
           
 long getTimestamp(java.lang.String name)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TRUE

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

FALSE

public static final java.lang.String FALSE
See Also:
Constant Field Values
Constructor Detail

ValueContainer

public ValueContainer()
Method Detail

addString

public abstract void addString(java.lang.String name,
                               java.lang.String value)
Parameters:
name - - the name of the attribute
value - - the String value of the attribute

addByte

public void addByte(java.lang.String name,
                    byte value)
Parameters:
name - - the name of the attribute
value - - the byte value of the attribute

addShort

public void addShort(java.lang.String name,
                     short value)
Parameters:
name - - the name of the attribute
value - - the short value of the attribute

addInt

public void addInt(java.lang.String name,
                   int value)
Parameters:
name - - the name of the attribute
value - - the int value of the attribute

addLong

public void addLong(java.lang.String name,
                    long value)
Parameters:
name - - the name of the attribute
value - - the long value of the attribute

addFloat

public void addFloat(java.lang.String name,
                     float value)
Parameters:
name - - the name of the attribute
value - - the float value of the attribute

addDouble

public void addDouble(java.lang.String name,
                      double value)
Parameters:
name - - the name of the attribute
value - - the double value of the attribute

addBoolean

public void addBoolean(java.lang.String name,
                       boolean value)
Parameters:
name - - the name of the attribute
value - - the boolean value of the attribute

addChar

public void addChar(java.lang.String name,
                    char value)
Parameters:
name - - the name of the attribute
value - - the char value of the attribute

addTimestamp

public void addTimestamp(java.lang.String name,
                         long value)
Parameters:
name - - the name of the attribute
value - - the value of the timestamp defined as milliseconds since midnight, January 1, 1970 UTC

getString

public abstract java.lang.String getString(java.lang.String name)
Parameters:
name - - the name of the attribute
Returns:
Returns the corresponding String value if available, null else

getByte

public byte getByte(java.lang.String name)
Parameters:
name - - the name of the attribute
Returns:
Returns the corresponding byte value if available, 0 else

getShort

public short getShort(java.lang.String name)
Parameters:
name - - the name of the attribute
Returns:
Returns the corresponding short value if available, 0 else

getInt

public int getInt(java.lang.String name)
Parameters:
name - - the name of the attribute
Returns:
Returns the corresponding int value if available, 0 else

getLong

public long getLong(java.lang.String name)
Parameters:
name - - the name of the attribute
Returns:
Returns the corresponding long value if available, 0L else

getFloat

public float getFloat(java.lang.String name)
Parameters:
name - - the name of the attribute
Returns:
Returns the corresponding float value if available, 0.0f else

getDouble

public double getDouble(java.lang.String name)
Parameters:
name - - the name of the attribute
Returns:
Returns the corresponding double value if available, 0.0d else

getBoolean

public boolean getBoolean(java.lang.String name)
Parameters:
name - - the name of the attribute
Returns:
Returns the corresponding boolean value if available, false else

getChar

public char getChar(java.lang.String name)
Parameters:
name - - the name of the attribute
Returns:
Returns the corresponding char value if available, '' else

getTimestamp

public long getTimestamp(java.lang.String name)
Parameters:
name - - the name of the attribute
Returns:
Returns the timestamp value defined as milliseconds since midnight, January 1, 1970 UTC if available, 0.0 else