From 791a2749886f02ec7b8db25bf8862e8269b96da5 Mon Sep 17 00:00:00 2001
From: Harvey Harrison
* The capacity may grow with a put operation w/ insufficient {@link #remaining()} elements left, if {@link #getGrowSize()} > 0.
- *
- * Position is in the range: 0 ≤ position < {@link #capacity()}. + * Position is in the range: 0 ≤ position < {@link #capacity()}. *
** The position equals to the number of elements stored. *
**/ int position(); - + /** * Sets the position of this stack. - * + * * @param newPosition the new position * @throws IndexOutOfBoundsException ifnewPosition
is outside of range: 0 ≤ position < {@link #capacity()}.
*/
void position(int newPosition) throws IndexOutOfBoundsException;
-
- /**
+
+ /**
* Returns the remaining elements left before stack will grow about {@link #getGrowSize()}.
* * remaining := capacity() - position(); *- *
+ *
* 0 denotes a full stack. - *
+ * * @see #capacity() * @see #position() **/ int remaining(); - + /** Returns the grow size. A stack grows by this size in case a put operation exceeds it's {@link #capacity()}. */ int getGrowSize(); /** Set new {@link #growSize(). */ - void setGrowSize(int newGrowSize); + void setGrowSize(int newGrowSize); } -- cgit v1.2.3