etc.negui.containers.dicarray

連想配列+配列。
連想配列部分は文字列とする。
History:
1.100
  • 新規作成。
class DicArrayException: etc.negui.containers.container.ContainerException;

class DicArray(T): IArrayLastIndex;

this();

template isSafe(TYPE) if (IsIndexOrKey!(TYPE))

bool isKey(in Text Key );

size_t length();

size_t lastIndex();

size_t keyToIndex(in Text Key );
キーからインデックスの取得。
Text indexToKey(size_t Index );
インデックスからキーの取得。
const(T*) opIn_r(size_t Index );

const(T*) opIn_r(in Text Key );

T add(in Text Key , T Value );
値の追加。
Throws:
Keyがすでに設定されている場合はDicArrayException。
T set(in Text Key , T Value );
T set(size_t Index , T Value );
値の設定。
Throws:
Keyが存在しない場合はDicArrayException。
T insert(size_t Position , in Text Key , T Value );
値の挿入。
T opIndex(size_t Index );
T opIndex(in Text Key );

T opIndexAssign(T Value , size_t Index );
T opIndexAssign(T Value , in Text Key );

T[] opSlice();
T[] opSlice(size_t From , size_t Length );

void clear();
全て削除。
void rehash();

template erase(TYPE) if (IsIndexOrKey!(TYPE))
項目の削除。
Params:
IndexKey
Textかsize_tの型。
void erase(in TYPE IndexKey );
項目の削除。
Params:
TYPE IndexKey
Textかsize_tの型。
void swap(size_t a , size_t b );
void swap(in Text a , in Text b );
交換。
int opApply(int delegate(ref T Index) dg );

const(Text[]) keys();

const(T[]) values();