org.mozilla.javascript

Class ObjArray

public class ObjArray extends Object implements Serializable

Implementation of resizable array with focus on minimizing memory usage by storing few initial array elements in object fields. Can also be used as a stack.
Constructor Summary
ObjArray()
Method Summary
voidadd(Object value)
voidadd(int index, Object value)
voidclear()
Objectget(int index)
intindexOf(Object obj)
booleanisEmpty()
booleanisSealed()
intlastIndexOf(Object obj)
Objectpeek()
Objectpop()
voidpush(Object value)
voidremove(int index)
voidseal()
voidset(int index, Object value)
voidsetSize(int newSize)
intsize()
Object[]toArray()
voidtoArray(Object[] array)
voidtoArray(Object[] array, int offset)

Constructor Detail

ObjArray

public ObjArray()

Method Detail

add

public final void add(Object value)

add

public final void add(int index, Object value)

clear

public final void clear()

get

public final Object get(int index)

indexOf

public int indexOf(Object obj)

isEmpty

public final boolean isEmpty()

isSealed

public final boolean isSealed()

lastIndexOf

public int lastIndexOf(Object obj)

peek

public final Object peek()

pop

public final Object pop()

push

public final void push(Object value)

remove

public final void remove(int index)

seal

public final void seal()

set

public final void set(int index, Object value)

setSize

public final void setSize(int newSize)

size

public final int size()

toArray

public final Object[] toArray()

toArray

public final void toArray(Object[] array)

toArray

public final void toArray(Object[] array, int offset)