Priority todo: get element priority
Static methods
Constructor
Variables
Methods
add(e:T, priority:Int = 0):Priority<T>
Add element in priority list with custom priority.
Parameters:
element | elements for adding. |
---|---|
priority | priority, smalest first, bigest last, default 0 (0 - normal priority). |
inlineaddArray(a:Array<T>, priority:Int = 0):Priority<T>
Add elements array in priority list with custom priority.
Parameters:
a | elements array for adding. |
---|---|
priority | priority, smalest first, bigest last, default 0 (0 - normal priority). |
backLoop():Null<T>
Make infinity loop. This good method for devolopment UI.
Returns:
Previos element in loop.
dynamiccompare(a:T, b:T):Bool
Set this function for custom compare priority elements
Parameters:
a | |
---|---|
null | b |
iterator():Iterator<T>
Example: [ var sum:Int = 0; for (e in p)
sum += e;
sum; //145 ]
Elements begining with lowest priority, ending higtest.
This funcion not crashed if you make operations with Priority object. You can remove and add elements in "for" body.
inlinereloop(e:T):Void
Start loop from custom element. Use exists() before call this function for safely run.
Parameters:
e | first element for loop. |
---|
inlinerepriority(priority:Int = 0):Void
All elements taking new priority, but save order.
Parameters:
priority | New priority, default 0 |
---|