A data structure made to have the features of an Array and a Map using an array of nb.fs.NamedData<T>.

Warning : It is possible to have values with the same key. When that happens, get and set functions will refer to the value at the lowest position in the array.

Available since

0.1.0

.

Static methods

staticchangeKey(this:Array<NamedData<T>>, oldKey:String, newKey:String):Null<NamedData<T>>

Unmaps the NamedData<T> mapped to oldKey and maps it to newKey. newKey shouldn't be already mapped.

Parameters:

oldKey

A mapped key that will be unmapped.

newKey

An unmapped key to map to.

Returns:

The NamedData<T> that had its mapping changed, null if oldKey wasn't mapped.

staticinlineexists(this:Array<NamedData<T>>, key:String):Bool

Returns true if key is mapped, false otherwise.

@:arrayAccessstaticinlineget(this:Array<NamedData<T>>, key:String):Null<NamedData<T>>

Returns the mapping of key.

Parameters:

key

A key, which is also the name of a NamedData<T>.

Returns:

The NamedData<T> mapped to key if one is found, null otherwise.

@:arrayAccessstaticinlinegetFromIndex(this:Array<NamedData<T>>, i:Int):Null<NamedData<T>>

Returns the NamedData<T> in this instance at position i.

staticinlinekeyValueIterator(this:Array<NamedData<T>>):MapArrayKVIterator<T>

Returns an iterator over the keys of this instance and the data contained within the NamedData<T> mapped to it.

staticinlinekeys(this:Array<NamedData<T>>):MapArrayKIterator<T>

Returns an iterator over the keys of this instance.

@:arrayAccessstaticsetString(this:Array<NamedData<T>>, key:String, value:T):T

Maps key to a NamedData<T> containing value.

Creates a new NamedData<T> if there isn't already one associated with the key.

Parameters:

key

A key, which is also the name of a NamedData<T>.

value

A value, which will be stored in data of a NamedData<T>.

Returns:

The NamedData<T> mapped to key.

staticinlinevalues(this:Array<NamedData<T>>):MapArrayVIterator<T>

Returns an iterator over the data contained within the NamedData<T>s of this instance.