Constructor
new MappedArray(arr, getKeyopt, isMappedMapopt) → {object}
Parameters:
-
Arrayarr
インデクスをつける対象の配列
-
String | function <optional> ""getKey
MappedArrayのKey値の取得方法String指定のとき(デフォルト""を含む)、配列要素の値(valueOf)
注: 0,00,"0"は同値、1,01,"1"は同値 Stringのとき、 配列要素が持つ指定要素の値
functionのとき、配列要素に指定関数を適用した戻り値
関数の引数:(配列要素オブジェクト、配列のインデックス、作成中のMappedArrayへの参照)
-
Boolean <optional>isMappedMap
getKeyが2段Map用の配列を返却する
Returns:
-
object
Index arrに対するインデックス(連想配列名で検索)
Example
_tatMap = new HJN_util.MappedArray(eTat, this._getKey, true);
Methods
(static) MappedArray#has()
値の存在チェック
(static) MappedArray#indexes()
該当位置を配列で返す
(static) MappedArray#indexOf()
Array.prototype.indexOf() 同等
(static) MappedArray#lastIndexOf()
Array.prototype.lastIndexOf() 同等
(static) MappedArray#search()
該当する要素を配列で返す