Package | com.yworks.yfiles.util |
Class | public class BoundedQueue |
Inheritance | BoundedQueue YObject Object |
Property | Defined By | ||
---|---|---|---|
empty : Boolean [read-only]
Returns true if this queue is empty. | BoundedQueue |
Method | Defined By | ||
---|---|---|---|
BoundedQueue(capacity:int, init:Boolean = true)
Creates a new instance of BoundedQueue. | BoundedQueue | ||
append(x:Object):void
Appends x to the rear of this queue. | BoundedQueue | ||
capacity():int
Returns the maximal number of elements that this queue can hold. | BoundedQueue | ||
clear():void
Removes all elements from this queue. | BoundedQueue | ||
dequeue():Object
Returns the front element in this queue and removes it from the queue. | BoundedQueue | ||
enqueue(x:Object):void
Appends x to the rear of this queue. | BoundedQueue | ||
equals(o:Object):Boolean | YObject | ||
getClass():Class [override] | BoundedQueue | ||
hashCode():int | YObject | ||
newBoundedQueue1(capacity:int):BoundedQueue [static]
Creates a new instance of BoundedQueue. | BoundedQueue | ||
newBoundedQueue2(array:Vector.<Object>, capacity:int):BoundedQueue [static]
Creates a new instance of BoundedQueue copying the values in the given array to the queue. | BoundedQueue | ||
[static]
Creates a new instance of BoundedQueue copying the values in the given collection to the queue. | BoundedQueue | ||
[static]
Creates a new instance of BoundedQueue copying the values from the given iterator to the queue. | BoundedQueue | ||
[static]
Creates a new instance of BoundedQueue copying the values from the cursor to the queue. | BoundedQueue | ||
[static]
Creates a new instance of BoundedQueue copying the values in the given list to the queue. | BoundedQueue | ||
pop():Object
Returns the front element in this queue and removes it from the queue. | BoundedQueue | ||
size():int
Returns the number of elements in this queue. | BoundedQueue | ||
top():Object
Returns the front element in this queue. | BoundedQueue | ||
toString():String | BoundedQueue |
Method | Defined By | ||
---|---|---|---|
initBoundedQueue1(capacity:int):void
Initializes this object. | BoundedQueue | ||
initBoundedQueue2(array:Vector.<Object>, capacity:int):void
Initializes this object. | BoundedQueue | ||
initBoundedQueue3(collection:Collection, capacity:int):void
Initializes this object. | BoundedQueue | ||
initBoundedQueue4(it:Iterator, capacity:int):void
Initializes this object. | BoundedQueue | ||
initBoundedQueue5(cr:YCursor, capacity:int):void
Initializes this object. | BoundedQueue | ||
initBoundedQueue6(list:YList, capacity:int):void
Initializes this object. | BoundedQueue |
empty | property |
empty:Boolean
[read-only] Returns true if this queue is empty.
public function get empty():Boolean
BoundedQueue | () | Constructor |
public function BoundedQueue(capacity:int, init:Boolean = true)
Creates a new instance of BoundedQueue.
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.
|
append | () | method |
public function append(x:Object):void
Appends x
to the rear of this queue.
Same as enqueue().
Parameters
x:Object |
See also
capacity | () | method |
public function capacity():int
Returns the maximal number of elements that this queue can hold.
Returnsint |
clear | () | method |
public function clear():void
Removes all elements from this queue.
dequeue | () | method |
public function dequeue():Object
Returns the front element in this queue and removes it from the queue.
Precondition !isEmpty()
Object |
enqueue | () | method |
public function enqueue(x:Object):void
Appends x
to the rear of this queue.
Precondition size() < capacity()
Parameters
x:Object |
getClass | () | method |
override public function getClass():Class
ReturnsClass |
initBoundedQueue1 | () | method |
protected final function initBoundedQueue1(capacity:int):void
Initializes this object. See the documentation of the corresponding factory method newBoundedQueue1()
for details.
Parameters
capacity:int |
See also
initBoundedQueue2 | () | method |
protected final function initBoundedQueue2(array:Vector.<Object>, capacity:int):void
Initializes this object. See the documentation of the corresponding factory method newBoundedQueue2()
for details.
Parameters
array:Vector.<Object> | |
capacity:int |
See also
initBoundedQueue3 | () | method |
protected final function initBoundedQueue3(collection:Collection, capacity:int):void
Initializes this object. See the documentation of the corresponding factory method newBoundedQueue3()
for details.
Parameters
collection:Collection | |
capacity:int |
See also
initBoundedQueue4 | () | method |
protected final function initBoundedQueue4(it:Iterator, capacity:int):void
Initializes this object. See the documentation of the corresponding factory method newBoundedQueue4()
for details.
Parameters
it:Iterator | |
capacity:int |
See also
initBoundedQueue5 | () | method |
protected final function initBoundedQueue5(cr:YCursor, capacity:int):void
Initializes this object. See the documentation of the corresponding factory method newBoundedQueue5()
for details.
Parameters
cr:YCursor | |
capacity:int |
See also
initBoundedQueue6 | () | method |
protected final function initBoundedQueue6(list:YList, capacity:int):void
Initializes this object. See the documentation of the corresponding factory method newBoundedQueue6()
for details.
Parameters
list:YList | |
capacity:int |
See also
newBoundedQueue1 | () | method |
public static function newBoundedQueue1(capacity:int):BoundedQueue
Creates a new instance of BoundedQueue.
Parameters
capacity:int — the maximum capacity of this queue.
|
BoundedQueue |
newBoundedQueue2 | () | method |
public static function newBoundedQueue2(array:Vector.<Object>, capacity:int):BoundedQueue
Creates a new instance of BoundedQueue copying the values in the given array to the queue.
Parameters
array:Vector.<Object> — the array to be used as the queue
| |
capacity:int — the maximum capacity of the queue
|
BoundedQueue |
newBoundedQueue3 | () | method |
public static function newBoundedQueue3(collection:Collection, capacity:int):BoundedQueue
Creates a new instance of BoundedQueue copying the values in the given collection to the queue.
Parameters
collection:Collection — the elements which reside in the queue initially
| |
capacity:int — the maximal capacity of the queue
|
BoundedQueue |
newBoundedQueue4 | () | method |
public static function newBoundedQueue4(it:Iterator, capacity:int):BoundedQueue
Creates a new instance of BoundedQueue copying the values from the given iterator to the queue.
Parameters
it:Iterator — an iterator granting access to the initial elements of the queue.
| |
capacity:int — the maximal capacity of the queue
|
BoundedQueue |
newBoundedQueue5 | () | method |
public static function newBoundedQueue5(cr:YCursor, capacity:int):BoundedQueue
Creates a new instance of BoundedQueue copying the values from the cursor to the queue.
Parameters
cr:YCursor — a cursor granting access to the initial elements of the queue.
| |
capacity:int — the maximal capacity of the queue
|
BoundedQueue |
newBoundedQueue6 | () | method |
public static function newBoundedQueue6(list:YList, capacity:int):BoundedQueue
Creates a new instance of BoundedQueue copying the values in the given list to the queue.
Parameters
list:YList — the elements which reside in the queue initially
| |
capacity:int — the maximum capacity of the queue
|
BoundedQueue |
pop | () | method |
public function pop():Object
Returns the front element in this queue and removes it from the queue.
Same as dequeue()Precondition !isEmpty()
Object |
See also
size | () | method |
public function size():int
Returns the number of elements in this queue.
Returnsint |
top | () | method |
public function top():Object
Returns the front element in this queue.
Precondition !isEmpty()
Object |
toString | () | method |
public function toString():String
ReturnsString |