public class NodeVector extends Object implements Cloneable
| Modifier and Type | Field and Description |
|---|---|
protected int |
m_firstFree
Number of nodes in this NodeVector.
|
| Constructor and Description |
|---|
NodeVector()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addElement(int value)
Append a Node onto the vector.
|
Object |
clone() |
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.
|
int |
peepOrNull()
Return the node at the top of the stack without popping the stack.
|
void |
RemoveAllNoClear()
Set the length to zero, but don't clear the array.
|
int |
size()
Get the length of the list.
|
public Object clone() throws CloneNotSupportedException
clone in class ObjectCloneNotSupportedExceptionpublic int size()
public void addElement(int value)
value - Node to add to the vectorpublic final int peepOrNull()
public void insertElementAt(int value,
int at)
value - Node to insertat - Position where to insertpublic void RemoveAllNoClear()
public 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 forCopyright © 2022–2023. All rights reserved.