com.caucho.quercus.env
Class DoubleValue

java.lang.Object
  extended by com.caucho.quercus.env.Value
      extended by com.caucho.quercus.env.NumberValue
          extended by com.caucho.quercus.env.DoubleValue
All Implemented Interfaces:
java.io.Serializable

public class DoubleValue
extends NumberValue
implements java.io.Serializable

Represents a PHP double value.

See Also:
Serialized Form

Field Summary
static DoubleValue ZERO
           
 
Fields inherited from class com.caucho.quercus.env.Value
L, NULL_ARGS, NULL_VALUE_ARRAY, SCALAR_V
 
Constructor Summary
DoubleValue(double value)
           
 
Method Summary
 Value add(long lValue)
          Multiplies to the following value.
 Value add(Value rValue)
          Multiplies to the following value.
static DoubleValue create(double value)
           
static Value create(java.lang.Number value)
           
 boolean eql(Value rValue)
          Returns true for equality
 boolean equals(java.lang.Object o)
          Compare for equality.
 void generate(java.io.PrintWriter out)
          Generates code to recreate the expression.
 java.lang.String getType()
          Returns the type.
 ValueType getValueType()
          Returns the ValueType.
 int hashCode()
          Returns the hash code
 boolean isDoubleConvertible()
          Returns true for a double.
 boolean isLongConvertible()
          Returns true for integer looking doubles.
 boolean isNumeric()
          Returns true for is_numeric
 boolean isScalar()
          Returns true for a scalar
 Value mul(long lValue)
          Multiplies to the following value.
 Value mul(Value rValue)
          Multiplies to the following value.
 Value neg()
          Negates the value.
 Value pos()
          Returns the value
 Value postincr(int incr)
          Post-increment the following value.
 Value preincr(int incr)
          Pre-increment the following value.
 void print(Env env)
          Prints the value.
 void serialize(Env env, java.lang.StringBuilder sb)
          Serializes the value.
 boolean toBoolean()
          Converts to a boolean.
 double toDouble()
          Converts to a double.
 DoubleValue toDoubleValue()
          Converts to a double.
 java.lang.Object toJavaObject()
          Converts to a java object.
 Value toKey()
          Converts to a key.
 long toLong()
          Converts to a long.
 java.lang.Object toObject()
          Converts to an object.
 java.lang.String toString()
          Converts to a string.
 StringValue toStringBuilder(Env env)
          Converts to a string builder
 void varDumpImpl(Env env, WriteStream out, int depth, java.util.IdentityHashMap<Value,java.lang.String> valueSet)
           
 void varExport(java.lang.StringBuilder sb)
          Exports the value.
 
Methods inherited from class com.caucho.quercus.env.NumberValue
cmp, compareNum
 
Methods inherited from class com.caucho.quercus.env.Value
appendTo, appendTo, appendTo, appendTo, bitAnd, bitOr, bitXor, callClassMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callMethodRef, charValueAt, checkPrivate, checkProtected, clone, copy, copy, copy, copyArrayItem, copyReturn, copyTree, current, div, div, eq, eqValue, findFunction, geq, get, getArg, getArray, getArray, getClassName, getCount, getCountRecursive, getDirty, getField, getFieldArg, getFieldArgRef, getFieldArray, getFieldObject, getFieldRef, getIterator, getKeyArray, getKeyIterator, getObject, getObject, getRef, getResourceType, getSize, getThisField, getThisFieldArg, getThisFieldArgRef, getThisFieldArray, getThisFieldObject, getThisFieldRef, getValueArray, getValueIterator, gt, hasCurrent, isA, isArray, isBinary, isBoolean, isDefault, isEmpty, isNull, isNumberConvertible, isObject, isResource, isset, isset, issetField, issetThisField, isString, isUnicode, key, length, leq, lshift, lt, mod, next, nextIndex, print, printDepth, printJavaString, printR, printRImpl, put, put, putArray, putField, putField, putObject, putRef, putThisField, remove, rshift, serialize, set, setCharValueAt, sub_rev, sub, sub, toArgValue, toArgValueReadOnly, toArray, toArrayValue, toAutoArray, toAutoObject, toBigDecimal, toBigInteger, toBinaryValue, toBinaryValue, toChar, toDebugString, toException, toInputStream, toInt, toInternString, toJavaBoolean, toJavaByte, toJavaCalendar, toJavaCharacter, toJavaCollection, toJavaDate, toJavaDouble, toJavaFloat, toJavaInteger, toJavaList, toJavaLong, toJavaMap, toJavaObject, toJavaObjectNotNull, toJavaShort, toJavaString, toJavaURL, toLongValue, toObject, toRef, toRefValue, toRefVar, toString, toStringBuilder, toStringValue, toUnicodeValue, toUnicodeValue, toValue, toVar, unsetField, unsetThisField, valuesToArray, varDump
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

ZERO

public static final DoubleValue ZERO
Constructor Detail

DoubleValue

public DoubleValue(double value)
Method Detail

create

public static DoubleValue create(double value)

create

public static Value create(java.lang.Number value)

getType

public java.lang.String getType()
Returns the type.

Overrides:
getType in class Value

getValueType

public ValueType getValueType()
Returns the ValueType.

Overrides:
getValueType in class Value

isDoubleConvertible

public boolean isDoubleConvertible()
Returns true for a double.

Overrides:
isDoubleConvertible in class Value

isLongConvertible

public boolean isLongConvertible()
Returns true for integer looking doubles.

Overrides:
isLongConvertible in class Value

isNumeric

public boolean isNumeric()
Returns true for is_numeric

Overrides:
isNumeric in class Value

isScalar

public boolean isScalar()
Returns true for a scalar


toBoolean

public boolean toBoolean()
Converts to a boolean.

Overrides:
toBoolean in class Value

toLong

public long toLong()
Converts to a long.

Overrides:
toLong in class Value

toDouble

public double toDouble()
Converts to a double.

Overrides:
toDouble in class Value

toDoubleValue

public DoubleValue toDoubleValue()
Converts to a double.

Overrides:
toDoubleValue in class Value

toStringBuilder

public StringValue toStringBuilder(Env env)
Converts to a string builder

Overrides:
toStringBuilder in class Value

toKey

public Value toKey()
Converts to a key.

Overrides:
toKey in class Value

toJavaObject

public java.lang.Object toJavaObject()
Converts to a java object.

Overrides:
toJavaObject in class Value

neg

public Value neg()
Negates the value.

Overrides:
neg in class Value

pos

public Value pos()
Returns the value

Overrides:
pos in class Value

add

public Value add(Value rValue)
Multiplies to the following value.

Overrides:
add in class Value

add

public Value add(long lValue)
Multiplies to the following value.

Overrides:
add in class Value

preincr

public Value preincr(int incr)
Pre-increment the following value.

Overrides:
preincr in class Value

postincr

public Value postincr(int incr)
Post-increment the following value.

Overrides:
postincr in class Value

mul

public Value mul(Value rValue)
Multiplies to the following value.

Overrides:
mul in class Value

mul

public Value mul(long lValue)
Multiplies to the following value.

Overrides:
mul in class Value

eql

public boolean eql(Value rValue)
Returns true for equality

Overrides:
eql in class Value

toString

public java.lang.String toString()
Converts to a string.

Overrides:
toString in class java.lang.Object
Parameters:
env -

toObject

public java.lang.Object toObject()
Converts to an object.


print

public void print(Env env)
Prints the value.

Overrides:
print in class Value
Parameters:
env -

serialize

public void serialize(Env env,
                      java.lang.StringBuilder sb)
Serializes the value.

Overrides:
serialize in class Value

varExport

public void varExport(java.lang.StringBuilder sb)
Exports the value.

Overrides:
varExport in class Value

generate

public void generate(java.io.PrintWriter out)
              throws java.io.IOException
Generates code to recreate the expression.

Overrides:
generate in class Value
Parameters:
out - the writer to the Java source code.
Throws:
java.io.IOException

hashCode

public int hashCode()
Returns the hash code

Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
Compare for equality.

Overrides:
equals in class java.lang.Object

varDumpImpl

public void varDumpImpl(Env env,
                        WriteStream out,
                        int depth,
                        java.util.IdentityHashMap<Value,java.lang.String> valueSet)
                 throws java.io.IOException
Overrides:
varDumpImpl in class Value
Throws:
java.io.IOException