ru.onego.industrial.catalog.meta
Class DoubleValue

java.lang.Object
  extended by ru.onego.industrial.catalog.meta.DoubleValue
All Implemented Interfaces:
ColumnValue

public class DoubleValue
extends java.lang.Object
implements ColumnValue

Type for holding double values.

Version:
1.0
Author:
Lev Levin

Constructor Summary
DoubleValue()
           
 
Method Summary
 void add(java.lang.Object value)
          Adds given double value to stored one.
 java.lang.String getName()
          Returns name for this type.
 java.lang.Object getValue()
          Returns double value.
 boolean isEmpty()
          Returns true if this value is 0 or less.
 void setValue(java.lang.Object value)
          Sets value for this type.
 void setValue(java.lang.String value)
          Sets value for this type.
 java.lang.String toString()
          String representation of the stored value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DoubleValue

public DoubleValue()
Method Detail

getName

public java.lang.String getName()
Returns name for this type.

Specified by:
getName in interface ColumnValue
Returns:
"Double"

setValue

public void setValue(java.lang.Object value)
              throws MetaException
Sets value for this type. Value should be convertable to Double.

Specified by:
setValue in interface ColumnValue
Parameters:
value - Value to be set
Throws:
MetaException - Thrown if value is not convertable to Double

setValue

public void setValue(java.lang.String value)
              throws MetaException
Sets value for this type. Same as calling setValue(new Double(value))

Specified by:
setValue in interface ColumnValue
Parameters:
value - String value to be set
Throws:
MetaException - Thrown if value is not convertable to Double

getValue

public java.lang.Object getValue()
Returns double value.

Specified by:
getValue in interface ColumnValue
Returns:
Object convertable to Double

isEmpty

public boolean isEmpty()
Returns true if this value is 0 or less.

Specified by:
isEmpty in interface ColumnValue
Returns:
boolean

add

public void add(java.lang.Object value)
         throws MetaException
Adds given double value to stored one. Value should be convertable to Double.

Specified by:
add in interface ColumnValue
Parameters:
value - Value to be added
Throws:
MetaException - Thrown if value is not convertable to Double

toString

public java.lang.String toString()
String representation of the stored value. Returns value as nnnnnnn.nn

Overrides:
toString in class java.lang.Object
Returns:
String holding value