Modifier and Type | Field and Description |
---|---|
protected CharNode |
firstNode |
protected CharNode |
lastNode |
Constructor and Description |
---|
CharList()
Base constructor.
|
Modifier and Type | Method and Description |
---|---|
CharNode |
Delete(char character)
Deletes node with given character.
|
CharNode |
Delete(int index)
Deletes node with given index.
|
CharNode |
firstNode()
Getter for first node in list.
|
java.lang.Boolean |
Insert(char character,
int index)
Inserts new new node at given index in linked list.
|
CharNode |
lastNode()
Getter for last node in list.
|
CharNode |
Retrieve(int index)
Retrieves node from indicated index.
|
public CharNode firstNode()
public CharNode lastNode()
public CharNode Retrieve(int index)
index
- Index of node to retrieve.public java.lang.Boolean Insert(char character, int index)
character
- Character for node to hold.index
- Index of new node.public CharNode Delete(int index)
index
- Index of node to delete.public CharNode Delete(char character)
character
- Character to delete.