| java.lang.Object org.openlaszlo.iv.flash.util.IVVector
All known Subclasses: org.openlaszlo.iv.flash.api.Timeline, org.openlaszlo.iv.flash.api.Frame,
IVVector | public class IVVector implements Cloneable(Code) | | Simple unsynchronized vector.
author: Dmitry Skavish |
Constructor Summary | |
public | IVVector() Creates emtpy vector with default capacity. | public | IVVector(int capacity) Creates empty vector with specified capacity. | public | IVVector(IVVector data) Creates vector from existing one. |
Method Summary | |
final public void | addElement(Object o) Adds the specified object to the end of this vector,
increasing its size by one. | final public void | clear() Clears vector. | public Object | clone() Clones this vector. | final public void | copyInto(Object[] cobjects) Copies objects of the vector into specified array. | final public Object | elementAt(int index) Returns the object at the specified index. | final public Enumeration | elements() Returns enumeration of all the objects of the vector. | final public void | ensureCapacity(int cap) Ensure capacity of this vector.
Increases the capacity of this vector, if necessary, to ensure
that it can hold at least the number of objects specified by
the argument. | final protected int | find(Object o) | public IVVector | getCopy(ScriptCopier copier) Creates copy of this vector in jgenerator sense. | final protected void | init(int capacity) | final protected void | init(int capacity, int top) | final public void | insertObjects(int from, int num) Inserts specified number of null objects beginning from specified index. | public void | printContent(PrintStream out, String indent) Prints content of this vector. | final public void | removeElement(Object o) Removes the object from the vector. | final public Object | removeElementAt(int index) Removes the object at the specified index. | final public void | removeRange(int from, int to) Removes a number of objects. | final public void | reset() Resets vector. | final public void | setElementAt(Object o, int index) Sets the object at the specified index of this
vector to be the specified object. | final public int | size() Returns size of the vector. | public void | write(FlashOutput fob) Writes content of this vector to flash buffer. |
INIT_CAPACITY | final protected static int INIT_CAPACITY(Code) | | |
IVVector | public IVVector()(Code) | | Creates emtpy vector with default capacity.
|
IVVector | public IVVector(int capacity)(Code) | | Creates empty vector with specified capacity.
Parameters: capacity - initial capacity |
IVVector | public IVVector(IVVector data)(Code) | | Creates vector from existing one.
Creates vector with capacity equal to the size of given vector
and copies all data from given vector to this one
Parameters: data - vector to copy from |
addElement | final public void addElement(Object o)(Code) | | Adds the specified object to the end of this vector,
increasing its size by one. The capacity of this vector is
increased if its size becomes greater than its capacity.
Parameters: o - object to be added |
clear | final public void clear()(Code) | | Clears vector.
Removes all objects from the vector and fills it with nulls,
but does not change the capacity
|
clone | public Object clone()(Code) | | Clones this vector.
new vector - clone of this one |
copyInto | final public void copyInto(Object[] cobjects)(Code) | | Copies objects of the vector into specified array.
Parameters: cobjects - array of objects to be copied to |
elementAt | final public Object elementAt(int index)(Code) | | Returns the object at the specified index.
Parameters: index - the specified index object at specified index |
elements | final public Enumeration elements()(Code) | | Returns enumeration of all the objects of the vector.
enumeration of all the objects |
ensureCapacity | final public void ensureCapacity(int cap)(Code) | | Ensure capacity of this vector.
Increases the capacity of this vector, if necessary, to ensure
that it can hold at least the number of objects specified by
the argument.
Parameters: cap - new capacity |
init | final protected void init(int capacity)(Code) | | |
init | final protected void init(int capacity, int top)(Code) | | |
insertObjects | final public void insertObjects(int from, int num)(Code) | | Inserts specified number of null objects beginning from specified index.
Parameters: from - inserts nulls beginning from this index (including) Parameters: num - number of null objects to be inserted |
removeElement | final public void removeElement(Object o)(Code) | | Removes the object from the vector.
Finds the specified object in the vector and removes it.
Parameters: o - the specified object |
removeElementAt | final public Object removeElementAt(int index)(Code) | | Removes the object at the specified index.
Parameters: index - the specified index removed object at specified index |
removeRange | final public void removeRange(int from, int to)(Code) | | Removes a number of objects.
Parameters: from - first object to be removed from the vector Parameters: to - last object to be removed from the vector |
reset | final public void reset()(Code) | | Resets vector.
Removes all objects from the vector, but does not change the capacity
|
setElementAt | final public void setElementAt(Object o, int index)(Code) | | Sets the object at the specified index of this
vector to be the specified object. The previous object at that
position is discarded.
Parameters: o - new object to be set at the index Parameters: index - the specified index |
size | final public int size()(Code) | | Returns size of the vector.
size of the vector (number of objects in it) |
|
|