Class: MappedArray

MappedArray

配列位置逆引きマップ

配列に格納されているオブジェクトのx値で、配列位置を高速検索するマップ
指定関数の戻り値(x)をキーとするマップを作成する

参考 http://qiita.com/alucky0707/items/10052866719ba5c5f5d7

Constructor

src/timeSeries/timeSeries-MappedETat.js, line 142

new MappedArray(arr, getKeyopt, isMappedMapopt) → {object}

Parameters:
  • arr Array
    インデクスをつける対象の配列
  • getKey String | function <optional> ""
    MappedArrayのKey値の取得方法

    String指定のとき(デフォルト""を含む)、配列要素の値(valueOf)

    注: 0,00,"0"は同値、1,01,"1"は同値 Stringのとき、 配列要素が持つ指定要素の値

    functionのとき、配列要素に指定関数を適用した戻り値

    関数の引数:(配列要素オブジェクト、配列のインデックス、作成中のMappedArrayへの参照)

  • isMappedMap Boolean <optional>
    getKeyが2段Map用の配列を返却する
Returns:
  • object
    Index arrに対するインデックス(連想配列名で検索)
Example
_tatMap = new HJN_util.MappedArray(eTat, this._getKey, true);

Methods

src/timeSeries/timeSeries-MappedETat.js, line 227

(static) MappedArray#has()

値の存在チェック
src/timeSeries/timeSeries-MappedETat.js, line 235

(static) MappedArray#indexes()

該当位置を配列で返す
src/timeSeries/timeSeries-MappedETat.js, line 255

(static) MappedArray#indexOf()

Array.prototype.indexOf() 同等
src/timeSeries/timeSeries-MappedETat.js, line 265

(static) MappedArray#lastIndexOf()

Array.prototype.lastIndexOf() 同等
src/timeSeries/timeSeries-MappedETat.js, line 243
該当する要素を配列で返す