public interface PrimitiveStack
| Modifier and Type | Method and Description |
|---|---|
int |
capacity()
Returns this stack's current capacity.
|
int |
getGrowSize()
Returns the grow size.
|
int |
position()
Returns the current position of this stack.
|
void |
position(int newPosition)
Sets the position of this stack.
|
int |
remaining()
Returns the remaining elements left before stack will grow about
getGrowSize(). |
void |
setGrowSize(int newGrowSize)
Set new {@link #growSize().
|
int capacity()
The capacity may grow with a put operation w/ insufficient remaining() elements left, if getGrowSize() > 0.
int position()
Position is in the range: 0 ≤ position < capacity().
The position equals to the number of elements stored.
void position(int newPosition)
throws IndexOutOfBoundsException
newPosition - the new positionIndexOutOfBoundsException - if newPosition is outside of range: 0 ≤ position < capacity().int remaining()
getGrowSize().
remaining := capacity() - position();
0 denotes a full stack.
capacity(),
position()int getGrowSize()
capacity().void setGrowSize(int newGrowSize)