public class NodeVector extends Object implements Serializable, Cloneable
Modifier and Type | Field and Description |
---|---|
protected int |
m_firstFree
Number of nodes in this NodeVector.
|
Constructor and Description |
---|
NodeVector()
Default constructor.
|
NodeVector(int blocksize)
Construct a NodeVector, using the given block size.
|
Modifier and Type | Method and Description |
---|---|
void |
addElement(int value)
Append a Node onto the vector.
|
void |
appendNodes(NodeVector nodes)
Append the nodes to the list.
|
Object |
clone()
Get a cloned LocPathIterator.
|
boolean |
contains(int s)
Tell if the table contains the given node.
|
int |
elementAt(int i)
Get the nth element.
|
int |
indexOf(int elem)
Searches for the first occurence of the given argument,
beginning the search at index, and testing for equality
using the equals method.
|
int |
indexOf(int elem,
int index)
Searches for the first occurence of the given argument,
beginning the search at index, and testing for equality
using the equals method.
|
void |
insertElementAt(int value,
int at)
Inserts the specified node in this vector at the specified index.
|
void |
insertInOrder(int value)
Insert a node in order in the list.
|
int |
peepOrNull()
Return the node at the top of the stack without popping the stack.
|
int |
peepTail()
Return the node at the tail of the vector without popping
Special purpose method for TransformerImpl, pushElemTemplateElement.
|
int |
peepTailSub1()
Return the node one position from the tail without popping.
|
int |
pop()
Pop a node from the tail of the vector and return the result.
|
int |
popAndTop()
Pop a node from the tail of the vector and return the
top of the stack after the pop.
|
void |
popPair()
Pop a pair of nodes from the tail of the stack.
|
void |
popQuick()
Pop a node from the tail of the vector.
|
void |
push(int value)
Append a Node onto the vector.
|
void |
pushPair(int v1,
int v2)
Push a pair of nodes into the stack.
|
void |
removeAllElements()
Inserts the specified node in this vector at the specified index.
|
void |
RemoveAllNoClear()
Set the length to zero, but don't clear the array.
|
boolean |
removeElement(int s)
Removes the first occurrence of the argument from this vector.
|
void |
removeElementAt(int i)
Deletes the component at the specified index.
|
void |
setElementAt(int node,
int index)
Sets the component at the specified index of this vector to be the
specified object.
|
void |
setTail(int n)
Set the tail of the stack to the given node.
|
void |
setTailSub1(int n)
Set the given node one position from the tail.
|
int |
size()
Get the length of the list.
|
void |
sort()
Sort an array using a quicksort algorithm.
|
void |
sort(int[] a,
int lo0,
int hi0)
Sort an array using a quicksort algorithm.
|
public NodeVector()
public NodeVector(int blocksize)
blocksize
- Size of blocks to allocatepublic Object clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
public int size()
public void addElement(int value)
value
- Node to add to the vectorpublic final void push(int value)
value
- Node to add to the vectorpublic final int pop()
public final int popAndTop()
public final void popQuick()
public final int peepOrNull()
public final void pushPair(int v1, int v2)
v1
- First node to add to vectorv2
- Second node to add to vectorpublic final void popPair()
public final void setTail(int n)
n
- Node to set at the tail of vectorpublic final void setTailSub1(int n)
n
- Node to setpublic final int peepTail()
public final int peepTailSub1()
public void insertInOrder(int value)
value
- Node to insertpublic void insertElementAt(int value, int at)
value
- Node to insertat
- Position where to insertpublic void appendNodes(NodeVector nodes)
nodes
- NodeVector to append to this listpublic void removeAllElements()
public void RemoveAllNoClear()
public boolean removeElement(int s)
s
- Node to remove from the listpublic void removeElementAt(int i)
i
- Index of node to removepublic void setElementAt(int node, int index)
node
- Node to setindex
- Index of where to set the nodepublic int elementAt(int i)
i
- Index of node to getpublic boolean contains(int s)
s
- Node to look forpublic int indexOf(int elem, int index)
elem
- Node to look forindex
- Index of where to start the searchpublic int indexOf(int elem)
elem
- Node to look forpublic void sort(int[] a, int lo0, int hi0) throws Exception
a
- The array to be sorted.lo0
- The low index.hi0
- The high index.Exception
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.