|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface PrimitiveStack
Simple primitive-type stack.
| Method Summary | |
|---|---|
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(). |
| Method Detail |
|---|
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 position
IndexOutOfBoundsException - 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)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||