Package org.htmlunit.xpath.compiler
Class OpMapVector
- java.lang.Object
-
- org.htmlunit.xpath.compiler.OpMapVector
-
public class OpMapVector extends java.lang.ObjectLike IntVector, but used only for the OpMap array. Length of array is kept in the m_lengthPos position of the array. Only the required methods are in included here.
-
-
Field Summary
Fields Modifier and Type Field Description protected intm_blocksizeSize of blocks to allocateprotected intm_lengthPosPosition where size of array is keptprotected int[]m_mapArray of intsprotected intm_mapSizeSize of array
-
Constructor Summary
Constructors Constructor Description OpMapVector(int blocksize, int increaseSize, int lengthPos)Construct a OpMapVector, using the given block size.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intelementAt(int i)Get the nth element.voidsetElementAt(int value, int index)Sets the component at the specified index of this vector to be the specified object.voidsetToSize(int size)
-
-
-
Method Detail
-
elementAt
public final int elementAt(int i)
Get the nth element.- Parameters:
i- index of object to get- Returns:
- object at given index
-
setElementAt
public final void setElementAt(int value, int index)Sets the component at the specified index of this vector to be the specified object. The previous component at that position is discarded.The index must be a value greater than or equal to 0 and less than the current size of the vector.
- Parameters:
value- object to setindex- Index of where to set the object
-
setToSize
public final void setToSize(int size)
-
-