A view into an Array with an indexing offset.

Usages include 1-indexed sequences or zero-centered buffers with negative indexing.

Static variables

staticread onlylength:Int

Static methods

staticcircShift<T>(array:Array<T>, n:Int):Array<T>

Makes a shifted version of the given array, where elements are in the same order but shifted by n positions (to the right if positive and to the left if negative) in circular fashion (no elements discarded).

@:arrayAccessstaticinlineget(this:{offset:Int, array:Array<T>}, index:Int):T

staticinlinekeyValueIterator(this:{offset:Int, array:Array<T>}):KeyValueIterator<Int, T>

Iterates through items in their original order while providing the altered indexes as keys.

@:arrayAccessstaticinlineset(this:{offset:Int, array:Array<T>}, index:Int, value:T):Void