Package | com.yworks.yfiles.util |
Class | public class BoundedStack |
Inheritance | BoundedStack YObject Object |
Property | Defined By | ||
---|---|---|---|
empty : Boolean [read-only]
Returns true if this stack is empty. | BoundedStack |
Method | Defined By | ||
---|---|---|---|
BoundedStack(capacity:int, init:Boolean = true)
Creates a new instance of BoundedStack. | BoundedStack | ||
capacity():int
Returns the maximal number of elements that this stack can hold. | BoundedStack | ||
clear():void
Removes all elements from this stack;
| BoundedStack | ||
equals(o:Object):Boolean | YObject | ||
getClass():Class [override] | BoundedStack | ||
hashCode():int | YObject | ||
newBoundedStack(capacity:int):BoundedStack [static]
Creates a new instance of BoundedStack. | BoundedStack | ||
pop():Object
Returns the element that has been pushed last on this stack and removes it from this stack. | BoundedStack | ||
push(o:Object):void
Pushes a new element on this stack. | BoundedStack | ||
size():int
Returns the number of elements in this stack. | BoundedStack | ||
top():Object
Returns the element that has been pushed last on this stack. | BoundedStack |
Method | Defined By | ||
---|---|---|---|
initBoundedStack(capacity:int):void
Initializes this object. | BoundedStack |
empty | property |
empty:Boolean
[read-only] Returns true if this stack is empty.
public function get empty():Boolean
BoundedStack | () | Constructor |
public function BoundedStack(capacity:int, init:Boolean = true)
Creates a new instance of BoundedStack.
Parameterscapacity:int — the maximum capacity of this queue.
| |
init:Boolean (default = true ) — An internally used switch to help handle proper instance initialization in inheritance chains where classes can have multiple constructor-like factory methods.
This parameter can safely be ignored/omitted when calling the constructor.
|
capacity | () | method |
public function capacity():int
Returns the maximal number of elements that this stack can hold.
Returnsint |
clear | () | method |
public function clear():void
Removes all elements from this stack;
getClass | () | method |
override public function getClass():Class
ReturnsClass |
initBoundedStack | () | method |
protected final function initBoundedStack(capacity:int):void
Initializes this object. See the documentation of the corresponding factory method newBoundedStack()
for details.
Parameters
capacity:int |
See also
newBoundedStack | () | method |
public static function newBoundedStack(capacity:int):BoundedStack
Creates a new instance of BoundedStack.
Parameters
capacity:int — the maximum capacity of this queue.
|
BoundedStack |
pop | () | method |
public function pop():Object
Returns the element that has been pushed last on this stack and removes it from this stack.
Precondition !isEmpty()
Object |
push | () | method |
public function push(o:Object):void
Pushes a new element on this stack.
Parameters
o:Object |
size | () | method |
public function size():int
Returns the number of elements in this stack.
Returnsint |
top | () | method |
public function top():Object
Returns the element that has been pushed last on this stack.
Precondition !isEmpty()
Object |