| Modifier and Type | Field and Description |
|---|---|
| private byte[] | |
| private static final int | |
| private int |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| public boolean | |
| public int | Returns: the item at the top of this stack, or default valuevalue to return if stack is empty defaultValue)Looks at the item at the top of this stack without removing it. |
| public int | Returns: the item at the top of this stack, or default valuevalue to return if stack is empty defaultValue)Removes the item at the top of this stack and returns that item. |
| public byte | Returns: the item at the top of this stackRemoves the item at the top of this stack and returns that item. |
| public void | |
| public int |
| array | back to summary |
|---|---|
| private byte[] array | |
| MAX_ARRAY_SIZE | back to summary |
|---|---|
| private static final int MAX_ARRAY_SIZE | |
| size | back to summary |
|---|---|
| private int size | |
| ByteStack | back to summary |
|---|---|
| public ByteStack() Creates a new empty instance. | |
| grow | back to summary |
|---|---|
| private void grow(int length) | |
| isEmpty | back to summary |
|---|---|
| public boolean isEmpty() Returns
| |
| peek | back to summary |
|---|---|
| public int peek(int defaultValue) Looks at the item at the top of this stack without removing it.
| |
| poll | back to summary |
|---|---|
| public int poll(int defaultValue) Removes the item at the top of this stack and returns that item.
| |
| pop | back to summary |
|---|---|
| public byte pop() Removes the item at the top of this stack and returns that item.
| |
| push | back to summary |
|---|---|
| public void push(byte item) Pushes an item onto the top of this stack.
| |
| size | back to summary |
|---|---|
| public int size() Returns the number of items in this stack.
| |