forked from LeenkxTeam/LNXSDK
Update Files
This commit is contained in:
19
Kha/Tools/macos/std/haxe/iterators/RestKeyValueIterator.hx
Normal file
19
Kha/Tools/macos/std/haxe/iterators/RestKeyValueIterator.hx
Normal file
@ -0,0 +1,19 @@
|
||||
package haxe.iterators;
|
||||
|
||||
class RestKeyValueIterator<T> {
|
||||
final args:Rest<T>;
|
||||
var current:Int = 0;
|
||||
|
||||
@:allow(haxe.Rest)
|
||||
inline function new(args:Any) {
|
||||
this.args = args;
|
||||
}
|
||||
|
||||
public inline function hasNext():Bool {
|
||||
return current < args.length;
|
||||
}
|
||||
|
||||
public inline function next():{key:Int, value:T} {
|
||||
return {key:current, value:args[current++]};
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user