org.priha.core.values
Class DoubleValueImpl

java.lang.Object
  extended by org.priha.core.values.ValueImpl
      extended by org.priha.core.values.DoubleValueImpl
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Comparable<ValueImpl>, javax.jcr.Value

public class DoubleValueImpl
extends ValueImpl
implements javax.jcr.Value, java.io.Serializable

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.priha.core.values.ValueImpl
m_state
 
Constructor Summary
DoubleValueImpl(double value)
           
DoubleValueImpl(DoubleValueImpl value)
           
DoubleValueImpl(java.lang.String value)
           
 
Method Summary
protected  java.lang.Object clone()
           
 int compareTo(ValueImpl value)
          By default, does String comparison, which means it may fail.
 java.util.Calendar getDate()
           
 double getDouble()
           
 long getLong()
           
 java.lang.String getString()
           
 int getType()
           
 java.lang.String toString()
           
 
Methods inherited from class org.priha.core.values.ValueImpl
checkStream, checkValue, equals, getBoolean, getStream, valueAsString
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.jcr.Value
getBoolean, getStream
 

Constructor Detail

DoubleValueImpl

public DoubleValueImpl(double value)

DoubleValueImpl

public DoubleValueImpl(java.lang.String value)
                throws javax.jcr.ValueFormatException
Throws:
javax.jcr.ValueFormatException

DoubleValueImpl

public DoubleValueImpl(DoubleValueImpl value)
Method Detail

getType

public int getType()
Specified by:
getType in interface javax.jcr.Value

getDate

public java.util.Calendar getDate()
Specified by:
getDate in interface javax.jcr.Value
Overrides:
getDate in class ValueImpl

getLong

public long getLong()
Specified by:
getLong in interface javax.jcr.Value
Overrides:
getLong in class ValueImpl

getDouble

public double getDouble()
                 throws javax.jcr.ValueFormatException,
                        java.lang.IllegalStateException,
                        javax.jcr.RepositoryException
Specified by:
getDouble in interface javax.jcr.Value
Overrides:
getDouble in class ValueImpl
Throws:
javax.jcr.ValueFormatException
java.lang.IllegalStateException
javax.jcr.RepositoryException

getString

public java.lang.String getString()
                           throws javax.jcr.ValueFormatException,
                                  java.lang.IllegalStateException,
                                  javax.jcr.RepositoryException
Specified by:
getString in interface javax.jcr.Value
Overrides:
getString in class ValueImpl
Throws:
javax.jcr.ValueFormatException
java.lang.IllegalStateException
javax.jcr.RepositoryException

compareTo

public int compareTo(ValueImpl value)
Description copied from class: ValueImpl
By default, does String comparison, which means it may fail. Subclasses are expected to override.

Specified by:
compareTo in interface java.lang.Comparable<ValueImpl>
Overrides:
compareTo in class ValueImpl

clone

protected java.lang.Object clone()
                          throws java.lang.CloneNotSupportedException
Overrides:
clone in class java.lang.Object
Throws:
java.lang.CloneNotSupportedException

toString

public java.lang.String toString()
Overrides:
toString in class ValueImpl