public class ArrayValueImpl extends ArrayValue implements java.io.Serializable
ArrayValue.AbstractGet, ArrayValue.Entry, ArrayValue.EntryIterator, ArrayValue.EntrySet, ArrayValue.GetKey, ArrayValue.GetValue, ArrayValue.KeyComparator, ArrayValue.KeyIterator, ArrayValue.KeySet, ArrayValue.ValueCollection, ArrayValue.ValueComparator, ArrayValue.ValueIterator
L, NULL_ARGS, NULL_VALUE_ARRAY
Modifier | Constructor and Description |
---|---|
|
ArrayValueImpl() |
|
ArrayValueImpl(ArrayValue source) |
|
ArrayValueImpl(ArrayValueComponent[] components) |
|
ArrayValueImpl(ArrayValueImpl source) |
|
ArrayValueImpl(ConstArrayValue source) |
|
ArrayValueImpl(Env env,
ArrayValueComponent[] components) |
protected |
ArrayValueImpl(Env env,
ArrayValue copy,
CopyRoot root)
Copy for unserialization.
|
|
ArrayValueImpl(Env env,
java.util.IdentityHashMap<Value,Value> map,
ArrayValue copy) |
|
ArrayValueImpl(int size) |
|
ArrayValueImpl(Value[] values) |
|
ArrayValueImpl(Value[] keys,
Value[] values) |
Modifier and Type | Method and Description |
---|---|
ArrayValue |
append(Value key,
Value value)
Adds a new value.
|
void |
clear()
Clears the array
|
Value |
contains(Value value)
Returns the corresponding key if this array contains the given value
|
Value |
containsKey(Value key)
Returns the corresponding value if this array contains the given key
|
Value |
containsStrict(Value value)
Returns the corresponding key if this array contains the given value
|
Value |
copy()
Copy the value.
|
Value |
copy(Env env,
java.util.IdentityHashMap<Value,Value> map)
Copy for serialization
|
protected void |
copyFrom(ArrayValueImpl source) |
Value |
copyReturn()
Copy for return.
|
Value |
copySaveFunArg()
Copy for saving a method's arguments.
|
Value |
copyTree(Env env,
CopyRoot root)
Copy for serialization
|
Value |
createTailKey()
Creatse a tail index.
|
void |
generate(java.io.PrintWriter out)
Generates code to recreate the expression.
|
Value |
get(Value key)
Gets a new value.
|
Value |
getArg(Value index,
boolean isTop)
Returns the value as an argument which may be a reference.
|
Value |
getArgTail(Env env,
boolean isTop)
Sets the array tail, returning a reference to the tail.
|
Value |
getArray(Value index)
Returns the value as an array.
|
Value |
getDirty(Value index)
Returns the value as an array, using copy on write if necessary.
|
protected ArrayValue.Entry[] |
getEntries() |
protected int |
getHashMask() |
ArrayValue.Entry |
getHead()
Returns the head.
|
Value |
getKeys()
Returns the array keys.
|
protected long |
getNextAvailableIndex() |
Value |
getObject(Env env,
Value fieldName)
Returns the field value, creating an object if it's unset.
|
Value |
getRaw(Value key)
Returns the value in the array as-is.
|
Var |
getRef(Value index)
Returns the array ref.
|
int |
getSize()
Returns the size.
|
protected ArrayValue.Entry |
getTail()
Returns the tail.
|
java.lang.String |
getType()
Returns the type.
|
Value |
getValues()
Returns the array keys.
|
Var |
getVar(Value index)
Returns the array ref.
|
boolean |
isArray()
Returns true for an array.
|
Value |
pop(Env env)
Pops the top value.
|
Value |
put(Value value)
Add
|
Var |
putVar()
Sets the array ref.
|
Value |
remove(Value key)
Removes a value.
|
Value |
shuffle()
Shuffles the array
|
int |
size()
Returns the size.
|
ArrayValue |
slice(Env env,
int start,
int end,
boolean isPreserveKeys)
Slices.
|
ArrayValue |
splice(int start,
int end,
ArrayValue replace)
Replace a section of the array.
|
boolean |
toBoolean()
Converts to a boolean.
|
Value |
toLocalRef()
Convert to an argument value.
|
Value |
toLocalValue()
Convert to an argument value.
|
java.lang.Object |
toObject()
Converts to an object.
|
Value |
toRefValue()
Convert to an argument declared as a reference
|
StringValue |
toString(Env env)
Converts to a string.
|
ArrayValue |
unshift(Value value)
Add to the beginning
|
add, append, callCallback, callCallback, callCallback, cmp, current, each, end, entrySet, eq, eql, geq, getBaseIterator, getCount, getCountRecursive, getCurrent, getIterator, getKeyArray, getKeyIterator, getValueArray, getValueIterator, getValueType, gt, hasCurrent, isCallable, isEmpty, isEmpty, isset, jsonEncode, jsonEncodeAssociative, key, keyExists, keyReset, keySet, keysToArray, leq, lt, next, prev, print, printREntry, printRImpl, put, put, put, put, put, put, put, put, put, put, put, put, putAll, reset, serialize, setCurrent, sort, toArray, toArray, toArrayValue, toAutoArray, toBinaryValueMarshalCost, toCallable, toCharMarshalCost, toDouble, toEntryArray, toJavaCollection, toJavaList, toJavaMap, toJavaObject, toKey, toLong, toObject, toString, toStringMarshalCost, toStringValueMarshalCost, toUnicodeValueMarshalCost, values, valuesToArray, valuesToArray, varDumpEntry, varDumpImpl, varExportImpl
abs, add, addOne, appendTo, appendTo, appendTo, appendTo, bitAnd, bitOr, bitXor, call, call, call, call, call, call, call, callCopy, 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, callRef, callRef, callRef, callRef, callRef, callRef, callRef, charValueAt, checkPrivate, checkProtected, clone, copy, copyArrayItem, copyStringBuilder, div, div, eqValue, findFunction, findQuercusClass, get, getArray, getCallableName, getCalledClass, getClassName, getField, getFieldArg, getFieldArgRef, getFieldArray, getFieldObject, getFieldVar, getHashCode, getIterator, getObject, getObjectHash, getQuercusClass, getResourceType, getStaticFieldValue, getStaticFieldVar, getThisField, getThisFieldArg, getThisFieldArgRef, getThisFieldArray, getThisFieldObject, getThisFieldVar, hashCode, increment, initField, initField, initField, initIncompleteField, isA, isA, isBinary, isBoolean, isDefault, isDouble, isDoubleConvertible, isFieldExists, isFieldInit, isLong, isLongConvertible, isNull, isNumberConvertible, isNumeric, isObject, isResource, isset, issetField, issetThisField, isString, isUnicode, isVar, length, lshift, mod, mul, mul, neg, nextIndex, pos, postdecr, postincr, postincr, predecr, preincr, preincr, print, printDepth, printJavaChar, printJavaString, printR, put, putArray, putField, putField, putField, putObject, putThisField, putThisField, putThisFieldArray, rshift, serialize, set, setCharValueAt, setFieldInit, setJavaObject, setStaticFieldRef, sub_rev, sub, sub, subOne, toArgRef, toAutoObject, toBigDecimal, toBigInteger, toBinaryValue, toBinaryValue, toBinaryValue, toBooleanMarshalCost, toByteArrayMarshalCost, toByteMarshalCost, toChar, toCharArrayMarshalCost, toDebugString, toDouble, toDouble, toDouble, toDouble, toDoubleMarshalCost, toDoubleValue, toException, toFloatMarshalCost, toInputStream, toInt, toIntegerMarshalCost, toInternString, toJavaBoolean, toJavaByte, toJavaCalendar, toJavaCharacter, toJavaDate, toJavaDouble, toJavaEnum, toJavaFloat, toJavaInteger, toJavaLong, toJavaObject, toJavaObjectMarshalCost, toJavaObjectNotNull, toJavaShort, toJavaString, toJavaURL, toLocalThis, toLocalValueReadOnly, toLocalVar, toLocalVarDeclAsRef, toLong, toLong, toLong, toLong, toLongMarshalCost, toLongValue, toRef, toShortMarshalCost, toStringBuilder, toStringBuilder, toStringBuilder, toStringBuilder, toStringValue, toStringValue, toUnicode, toUnicodeValue, toUnicodeValue, toValue, toVar, unsetArray, unsetField, unsetThisArray, unsetThisField, unsetThisPrivateField, varDump, varExport
public ArrayValueImpl()
public ArrayValueImpl(int size)
public ArrayValueImpl(ArrayValue source)
public ArrayValueImpl(ArrayValueImpl source)
public ArrayValueImpl(ConstArrayValue source)
public ArrayValueImpl(Env env, java.util.IdentityHashMap<Value,Value> map, ArrayValue copy)
protected ArrayValueImpl(Env env, ArrayValue copy, CopyRoot root)
public ArrayValueImpl(Value[] values)
public ArrayValueImpl(Env env, ArrayValueComponent[] components)
public ArrayValueImpl(ArrayValueComponent[] components)
protected void copyFrom(ArrayValueImpl source)
protected ArrayValue.Entry[] getEntries()
protected int getHashMask()
protected long getNextAvailableIndex()
public java.lang.String getType()
getType
in class ArrayValue
public boolean toBoolean()
toBoolean
in class ArrayValue
public StringValue toString(Env env)
public java.lang.Object toObject()
toObject
in class ArrayValue
public Value copy()
copy
in class ArrayValue
public Value copyReturn()
copyReturn
in class ArrayValue
public Value copy(Env env, java.util.IdentityHashMap<Value,Value> map)
copy
in class ArrayValue
public Value copySaveFunArg()
copySaveFunArg
in class Value
public Value toLocalValue()
toLocalValue
in class Value
public Value toLocalRef()
toLocalRef
in class ArrayValue
public Value toRefValue()
toRefValue
in class Value
public int size()
public int getSize()
getSize
in class ArrayValue
public void clear()
clear
in class ArrayValue
public boolean isArray()
isArray
in class ArrayValue
public ArrayValue append(Value key, Value value)
append
in class ArrayValue
public ArrayValue unshift(Value value)
unshift
in class ArrayValue
public ArrayValue splice(int start, int end, ArrayValue replace)
splice
in class ArrayValue
public ArrayValue slice(Env env, int start, int end, boolean isPreserveKeys)
slice
in class ArrayValue
public Value getArg(Value index, boolean isTop)
getArg
in class ArrayValue
public Value getObject(Env env, Value fieldName)
getObject
in class ArrayValue
public Value getArray(Value index)
getArray
in class ArrayValue
public Value getDirty(Value index)
public Value put(Value value)
put
in class ArrayValue
public Var putVar()
putVar
in class ArrayValue
public Value getArgTail(Env env, boolean isTop)
getArgTail
in class Value
public Value createTailKey()
createTailKey
in class ArrayValue
public Value get(Value key)
get
in class ArrayValue
public Value getRaw(Value key)
getRaw
in class ArrayValue
public Value contains(Value value)
contains
in class ArrayValue
value
- to search for in the arraypublic Value containsStrict(Value value)
containsStrict
in class ArrayValue
value
- to search for in the arraypublic Value containsKey(Value key)
containsKey
in class ArrayValue
key
- to search for in the arraypublic Value remove(Value key)
remove
in class ArrayValue
public Var getVar(Value index)
getVar
in class ArrayValue
public Value pop(Env env)
pop
in class ArrayValue
public final ArrayValue.Entry getHead()
ArrayValue
getHead
in class ArrayValue
protected final ArrayValue.Entry getTail()
ArrayValue
getTail
in class ArrayValue
public Value shuffle()
shuffle
in class ArrayValue
public Value getKeys()
getKeys
in class ArrayValue
public Value getValues()
getValues
in class ArrayValue