Stack
Constructs a new Stack instance.
Parameters
initial Capacity
Initial capacity for the stack.
Default: 8
scale Factor
Factor by which the stack's capacity will be increased at a time when required to contain pushed values.
When a value is pushed onto the stack that would increase the stack's size to be greater than the stack's capacity, the data container underlying this stack will be resized to increase the capacity at a rate of capacity * scaleFactor
.
Default: 1.5
max Size
Size cap for the stack. If an attempt is made to push a number of items into this stack that is greater than the maxSize value, an exception will be thrown.
Default: 2147483647