com.caucho.quercus.env
Class LongValue

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

public class LongValue
extends NumberValue

Represents a PHP long value.

See Also:
Serialized Form

Field Summary
static LongValue MINUS_ONE
           
static LongValue ONE
           
static int STATIC_MAX
           
static int STATIC_MIN
           
static LongValue[] STATIC_VALUES
           
static LongValue ZERO
           
 
Fields inherited from class com.caucho.quercus.env.Value
L, NULL_ARGS, NULL_VALUE_ARRAY, SCALAR_V
 
Constructor Summary
LongValue(long value)
           
 
Method Summary
 Value add(long lLong)
          Adds to the following value.
 Value add(Value value)
          Adds to the following value.
 StringValue appendTo(BinaryBuilderValue sb)
          Append to a binary builder.
 StringValue appendTo(LargeStringBuilderValue sb)
          Append to a string builder.
 StringValue appendTo(StringBuilderValue sb)
          Append to a string builder.
 StringValue appendTo(UnicodeBuilderValue sb)
          Append to a unicode builder.
 int cmp(Value rValue)
          Returns true for equality
static LongValue create(long value)
           
static LongValue 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 isEmpty()
          Returns true if the value is empty
 boolean isLongConvertible()
          Returns true for a long.
 boolean isNumeric()
          Returns true for is_numeric
 boolean isScalar()
          Returns true for a scalar
 Value neg()
          Negates the value.
 long nextIndex(long oldIndex)
          Returns the next array index based on this value.
 Value pos()
          Negates 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.
 Value sub(long rLong)
          Subtracts the following value.
 Value sub(Value rValue)
          Subtracts to the following value.
 boolean toBoolean()
          Converts to a boolean.
 double toDouble()
          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.
 LongValue toLongValue()
          Converts to a long value
 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
compareNum
 
Methods inherited from class com.caucho.quercus.env.Value
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, isDoubleConvertible, isNull, isNumberConvertible, isObject, isResource, isset, isset, issetField, issetThisField, isString, isUnicode, key, length, leq, lshift, lt, mod, mul, mul, next, print, printDepth, printJavaString, printR, printRImpl, put, put, putArray, putField, putField, putObject, putRef, putThisField, remove, rshift, serialize, set, setCharValueAt, sub_rev, toArgValue, toArgValueReadOnly, toArray, toArrayValue, toAutoArray, toAutoObject, toBigDecimal, toBigInteger, toBinaryValue, toBinaryValue, toChar, toDebugString, toDoubleValue, toException, toInputStream, toInt, toInternString, toJavaBoolean, toJavaByte, toJavaCalendar, toJavaCharacter, toJavaCollection, toJavaDate, toJavaDouble, toJavaFloat, toJavaInteger, toJavaList, toJavaLong, toJavaMap, toJavaObject, toJavaObjectNotNull, toJavaShort, toJavaString, toJavaURL, 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

MINUS_ONE

public static final LongValue MINUS_ONE

ZERO

public static final LongValue ZERO

ONE

public static final LongValue ONE

STATIC_MIN

public static final int STATIC_MIN
See Also:
Constant Field Values

STATIC_MAX

public static final int STATIC_MAX
See Also:
Constant Field Values

STATIC_VALUES

public static final LongValue[] STATIC_VALUES
Constructor Detail

LongValue

public LongValue(long value)
Method Detail

create

public static LongValue create(long value)

create

public static LongValue 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

isLongConvertible

public boolean isLongConvertible()
Returns true for a long.

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


isEmpty

public boolean isEmpty()
Returns true if the value is empty

Overrides:
isEmpty in class Value

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

toString

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

Overrides:
toString in class java.lang.Object

toStringBuilder

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

Overrides:
toStringBuilder in class Value

toLongValue

public LongValue toLongValue()
Converts to a long value

Overrides:
toLongValue in class Value

toKey

public Value toKey()
Converts to a key.

Overrides:
toKey in class Value

toObject

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


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()
Negates the value.

Overrides:
pos 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

add

public Value add(Value value)
Adds to the following value.

Overrides:
add in class Value

add

public Value add(long lLong)
Adds to the following value.

Overrides:
add in class Value

sub

public Value sub(Value rValue)
Subtracts to the following value.

Overrides:
sub in class Value

sub

public Value sub(long rLong)
Subtracts the following value.

Overrides:
sub in class Value

eql

public boolean eql(Value rValue)
Returns true for equality

Overrides:
eql in class Value

cmp

public int cmp(Value rValue)
Returns true for equality

Overrides:
cmp in class NumberValue

nextIndex

public long nextIndex(long oldIndex)
Returns the next array index based on this value.

Overrides:
nextIndex in class Value

print

public void print(Env env)
Prints the value.

Overrides:
print in class Value
Parameters:
env -

appendTo

public StringValue appendTo(UnicodeBuilderValue sb)
Append to a unicode builder.

Overrides:
appendTo in class Value

appendTo

public StringValue appendTo(BinaryBuilderValue sb)
Append to a binary builder.

Overrides:
appendTo in class Value

appendTo

public StringValue appendTo(StringBuilderValue sb)
Append to a string builder.

Overrides:
appendTo in class Value

appendTo

public StringValue appendTo(LargeStringBuilderValue sb)
Append to a string builder.

Overrides:
appendTo in class Value

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 final 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