public class ContextStack
extends java.lang.Object
Constructor and Description |
---|
ContextStack(int maxSize)
The constructor.
|
ContextStack(int maxSize,
ContextStackItem[] items)
The constructor.
|
Modifier and Type | Method and Description |
---|---|
(package private) void |
addItem(ContextStackItem item)
Adds an item to the stack.
|
ContextStackItem[] |
getItems()
Returns the items.
|
(package private) int |
getMaximumSize()
Returns the maximum size.
|
(package private) void |
removeItem(int index)
Removes an item at the specified position.
|
(package private) void |
updateItem(int index,
ContextStackItem newItem)
Updates an item at the specified position.
|
ContextStack(int maxSize)
maxSize
- The maximum size.ContextStack(int maxSize, ContextStackItem[] items)
maxSize
- The maximum size.items
- Items to be added.public ContextStackItem[] getItems()
void removeItem(int index)
index
- The position of the item to be removed.void updateItem(int index, ContextStackItem newItem)
index
- The position of the item to be updated.newItem
- The new item.void addItem(ContextStackItem item)
item
- The item to be added.int getMaximumSize()