|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.caucho.quercus.env.Value
com.caucho.quercus.env.ArrayValue
com.caucho.quercus.env.ArrayValueWrapper
public class ArrayValueWrapper
Represents a PHP array value.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.caucho.quercus.env.ArrayValue |
|---|
ArrayValue.AbstractGet, ArrayValue.Entry, ArrayValue.EntryIterator, ArrayValue.EntrySet, ArrayValue.GetKey, ArrayValue.GetValue, ArrayValue.KeyComparator, ArrayValue.KeyIterator, ArrayValue.KeySet, ArrayValue.ValueCollection, ArrayValue.ValueComparator, ArrayValue.ValueIterator |
| Field Summary |
|---|
| Fields inherited from class com.caucho.quercus.env.ArrayValue |
|---|
_current, GET_KEY, GET_VALUE, KEY, VALUE |
| Fields inherited from class com.caucho.quercus.env.Value |
|---|
L, NULL_ARGS, NULL_VALUE_ARRAY, SCALAR_V |
| Constructor Summary | |
|---|---|
protected |
ArrayValueWrapper(ArrayValue array)
|
| Method Summary | |
|---|---|
Value |
add(Value rValue)
Returns a union of this array and the rValue as array. |
void |
clear()
Clears the array |
Value |
containsKey(Value key)
Returns the corresponding valeu if this array contains the given key |
Value |
copy()
Copy for assignment. |
Value |
copy(Env env,
java.util.IdentityHashMap<Value,Value> map)
Copy for serialization |
Value |
createTailKey()
Creatse a tail index. |
Value |
current()
Returns the current value. |
Value |
each()
The each iterator |
Value |
end()
Returns the last value. |
Value |
get(Value key)
Gets a new value. |
Value |
getArg(Value index)
Returns the value as an argument which may be a reference. |
ArrayValue |
getArray()
Returns the wrapped array. |
ArrayValue.Entry |
getHead()
Returns the head. |
java.util.Iterator<java.util.Map.Entry<Value,Value>> |
getIterator(Env env)
Returns an iterator for the key => value pairs. |
java.util.Iterator<Value> |
getKeyIterator(Env env)
Returns an iterator for the field keys. |
Var |
getRef(Value index)
Returns the array ref. |
int |
getSize()
Returns the size. |
protected ArrayValue.Entry |
getTail()
Returns the tail. |
java.util.Iterator<Value> |
getValueIterator(Env env)
Returns an iterator for the field values. |
boolean |
hasCurrent()
Returns true if there are more elements. |
Value |
key()
Returns the current key |
Value |
next()
Returns the next value. |
Value |
pop()
Pops the top value. |
Value |
prev()
Returns the previous value. |
Value |
put(Value value)
Add |
Value |
put(Value key,
Value value)
Adds a new value. |
Value |
putRef()
Sets the array ref. |
Value |
remove(Value key)
Removes a value. |
Value |
reset()
Returns the first value. |
void |
shuffle()
Shuffles the array |
ArrayValue |
splice(int start,
int end,
ArrayValue replace)
Splices values |
ArrayValue |
unshift(Value value)
Add to front. |
| Methods inherited from class com.caucho.quercus.env.ArrayValue |
|---|
append, append, cmp, contains, containsStrict, copyReturn, entrySet, eq, eql, geq, getArray, getCount, getCountRecursive, getKeyArray, getObject, getRaw, getType, getValueArray, getValueType, gt, isArray, isEmpty, keyReset, keySet, leq, lt, print, printREntry, printRImpl, put, put, put, put, put, put, put, put, put, put, putAll, serialize, sort, toArray, toArray, toArrayValue, toBoolean, toEntryArray, toJavaCollection, toJavaList, toJavaMap, toJavaObject, toObject, toObject, toString, values, valuesToArray, valuesToArray, varDumpEntry, varDumpImpl, varExport |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected ArrayValueWrapper(ArrayValue array)
| Method Detail |
|---|
public ArrayValue getArray()
getArray in class Valuepublic Value copy()
copy in class ArrayValue
public Value copy(Env env,
java.util.IdentityHashMap<Value,Value> map)
copy in class ArrayValuepublic int getSize()
getSize in class ArrayValuepublic void clear()
clear in class ArrayValue
public Value put(Value key,
Value value)
put in class ArrayValuepublic Value put(Value value)
put in class ArrayValuepublic ArrayValue unshift(Value value)
unshift in class ArrayValue
public ArrayValue splice(int start,
int end,
ArrayValue replace)
splice in class ArrayValuepublic Value getArg(Value index)
getArg in class ArrayValuepublic Value putRef()
putRef in class ArrayValuepublic Value createTailKey()
createTailKey in class ArrayValuepublic Value get(Value key)
get in class ArrayValuepublic Value remove(Value key)
remove in class ArrayValuepublic Var getRef(Value index)
getRef in class ArrayValuepublic Value pop()
pop in class ArrayValuepublic void shuffle()
shuffle in class ArrayValuepublic ArrayValue.Entry getHead()
getHead in class ArrayValueprotected ArrayValue.Entry getTail()
getTail in class ArrayValuepublic Value current()
current in class ArrayValuepublic Value key()
key in class ArrayValuepublic boolean hasCurrent()
hasCurrent in class ArrayValuepublic Value next()
next in class ArrayValuepublic Value prev()
prev in class ArrayValuepublic Value each()
each in class ArrayValuepublic Value reset()
reset in class ArrayValuepublic Value end()
end in class ArrayValuepublic Value containsKey(Value key)
containsKey in class ArrayValuekey - the key to search for in the array
java.lang.NullPointerExceptionpublic Value add(Value rValue)
ArrayValueArrayValue.put(Value) method.
add in class ArrayValuepublic java.util.Iterator<java.util.Map.Entry<Value,Value>> getIterator(Env env)
Value
getIterator in class ArrayValuepublic java.util.Iterator<Value> getKeyIterator(Env env)
ValueValue.getIterator(Env); derived classes may override and
provide a more efficient implementation.
getKeyIterator in class ArrayValuepublic java.util.Iterator<Value> getValueIterator(Env env)
ValueValue.getIterator(Env); derived classes may override and
provide a more efficient implementation.
getValueIterator in class ArrayValue
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||