Skip to content

Dictionary

RelaxToolsの中の人 edited this page May 20, 2020 · 21 revisions

2.3.10 Dictionary クラス

Remarks

Scripting.Dictionary のコンポジット(移譲)クラス。

  • IDictionary I/F を使用する必要がある。

Scripting.Dictionaryとの比較

No. Property/Method Scripting.Dictionary Dictionary(本クラス)
1 Add
2 Exists ContainsKey
3 Items なし
4 Keys
5 Remove
6 RemoveAll Clear
7 CompareMode なし(BinaryCompare固定)
8 Count
9 Item
10 Key
11 ToString ×

Sample

Dim dic As IDictionary
Set dic = Dictionary.NewInstance

dic.Add Key, Value

Dependent

History

Date Version Note
2019-01-01 Ver.1.0.0 新規作成
2020-05-20 Ver.1.0.1 NewEnumの実装をコレクションを作成するのではなく、CallByNameで取得する方法に修正

2.3.10.1 コンストラクタ

Syntax

Set obj = Dictionary.NewInstance()

Parameters

Name Required/Optional Data type Description
Dictionary 必須 Dictionary Dictionaryを指定

Return Value

Name Data type Description
obj IDictionary 新しいインスタンス(IDictionary)

Remarks

Dictionary を生成する場合

Example

  • None

See also

  • None


2.3.10.2 Add(IDictionary I/F)

Syntax

expression.Add(Key, obj)

Parameters

Name Required/Optional Data type Description
expression 必須 IDictionary IDictionary I/F のインスタンス
Key 必須 Variant キーを指定
obj 必須 Variant 追加するオブジェクトを指定

Return Value

  • None

Remarks

IDictionary I/F のメソッドです。
Dictionary に項目を追加する。

Example

  • None

See also


2.3.10.3 ContainsKey(IDictionary I/F)

Syntax

bool = expression.ContainsKey(Key)

Parameters

Name Required/Optional Data type Description
expression 必須 IDictionary IDictionary I/F のインスタンス
Key 必須 Variant キー項目

Return Value

Name Data type Description
bool Boolean キーが存在する場合:True/キーが存在しない場合:False

Remarks

IDictionary I/F のメソッドです。
Dictionary のキーの存在チェック

Example

  • None

See also


2.3.10.4 Keys(IDictionary I/F)

Syntax

var = expression.Keys()

Parameters

Name Required/Optional Data type Description
expression 必須 IDictionary IDictionary I/F のインスタンス

Return Value

Name Data type Description
var Variant キー配列を返却

Remarks

IDictionary I/F のメソッドです。
Dictionary のキー情報を返却

Example

  • None

See also


2.3.10.5 Count(IDictionary I/F)

Syntax

var = expression.Count

Parameters

Name Required/Optional Data type Description
expression 必須 IDictionary IDictionary I/F のインスタンス

Return Value

Name Data type Description
var Long Dictionaryの要素数を返却

Remarks

IDictionary I/F のプロパティです。
Dictionary 要素数を返却

Example

  • None

See also


2.3.10.6 Item(IDictionary I/F)

Syntax

var = expression.Item(idx)

Parameters

Name Required/Optional Data type Description
expression 必須 IDictionary IDictionary I/F のインスタンス
Key 必須 Variant 取得する項目のキーを指定します。

Return Value

Name Data type Description
var Variant Dictionary の指定位置の項目

Remarks

IDictionary I/F のGetプロパティです。
Dictionary の指定位置の項目を取得

Example

  • None

See also


2.3.10.7 Item(IDictionary I/F)

Syntax

Let expression.Item(Key) = value

Parameters

Name Required/Optional Data type Description
expression 必須 IDictionary IDictionary I/F のインスタンス
Key 必須 Variant 取得する項目のキーを指定します。

Return Value

Name Data type Description
value Variant 新しい設定項目

Remarks

IDictionary I/F のLetプロパティです。
Dictionary の指定キーの項目を設定

Example

  • None

See also


2.3.10.8 Item(IDictionary I/F)

Syntax

Set expression.Item(Key) = value

Parameters

Name Required/Optional Data type Description
expression 必須 IDictionary IDictionary I/F のインスタンス
Key 必須 Variant 取得する項目のキーを指定します。

Return Value

Name Data type Description
value Variant 新しい設定項目

Remarks

IDictionary I/F のSetプロパティです。
Dictionary の指定キーの項目を設定

Example

  • None

See also


2.3.10.9 Remove(IDictionary I/F)

Syntax

expression.Remove(Key)

Parameters

Name Required/Optional Data type Description
expression 必須 IDictionary IDictionary I/F のインスタンス
Key 必須 Variant 削除する項目のキーを指定します。

Return Value

  • None

Remarks

IDictionary I/F のメソッドです。
Dictionary の指定位置の項目を削除

Example

  • None

See also


2.3.10.10 Clear(IDictionary I/F)

Syntax

expression.Clear()

Parameters

Name Required/Optional Data type Description
expression 必須 IDictionary IDictionary I/F のインスタンス

Return Value

  • None

Remarks

IDictionary I/F のメソッドです。
Dictionary の項目を全削除

Example

  • None

See also


2.3.10.11 ToString(IDictionary I/F)

Syntax

var = expression.ToString()

Parameters

Name Required/Optional Data type Description
expression 必須 IDictionary IDictionary I/F のインスタンス

Return Value

Name Data type Description
var String JSON文字列を返却

Remarks

IDictionary I/F のメソッドです。
Dictionary をJSONに変換

Example

  • None

See also


2.3.10.12 GetCursor(IDictionary I/F)

Syntax

Set var = expression.GetCursor()

Parameters

Name Required/Optional Data type Description
expression 必須 IDictionary IDictionary I/F を指定します。

Return Value

Name Data type Description
var ICursor ICursor I/F を返却

Remarks

IList I/F のメソッドです。
ICursor インターフェースを取得

Example

  • None

See also


2.3.10.13 Eof(ICursor I/F)

Syntax

var = expression.Eof()

Parameters

Name Required/Optional Data type Description
expression 必須 ICursor ICursor I/F を指定します。

Return Value

Name Data type Description
var Boolean カーソルが終了:True / カーソルが終了していない:False

Remarks

ICursor I/F のプロパティです。
ICursor の Eof プロパティを取得。カーソルの終了を検出します。

Example

  • None

See also


2.3.10.14 Item(ICursor I/F)

Syntax

var = expression.Item()

Parameters

Name Required/Optional Data type Description
expression 必須 ICursor ICursor I/F を指定します。

Return Value

Name Data type Description
var Variant カーソル位置の内容を取得します。

Remarks

ICursor I/F のプロパティです。
ICursor の Item プロパティを取得。現在行の内容を取得します。

Example

  • None

See also


2.3.10.15 MoveFirst(ICursor I/F)

Syntax

expression.MoveFirst()

Parameters

Name Required/Optional Data type Description
expression 必須 ICursor ICursor I/F を指定します。

Return Value

  • None

Remarks

ICursor I/F のメソッドです。
カーソル位置の初期化を行います。

Example

  • None

See also


2.3.10.16 MoveNext(ICursor I/F)

Syntax

expression.MoveNext()

Parameters

Name Required/Optional Data type Description
expression 必須 ICursor ICursor I/F を指定します。

Return Value

  • None

Remarks

ICursor I/F のメソッドです。
カーソル位置を次に移動します。

Example

  • None

See also


2.3.10.17 NewInstance(INewInstance I/F)

Syntax

Set var = expression.NewInstance()

Parameters

Name Required/Optional Data type Description
expression 必須 ICursor INewInstance I/F を指定します。

Return Value

Name Data type Description
var Object 新しいDictionaryのインスタンス(IDictionary I/F)

Remarks

INewInstance I/F のメソッドです。
新しいインスタンス(IDictionary I/F)を生成して返却します。

Example

  • None

See also


2.3.10.18 SetProperty(ICompatibleProperty I/F)

Syntax

expression.SetProperty(property, value)

Parameters

Name Required/Optional Data type Description
expression 必須 ICompatibleProperty ICompatibleProperty I/F を指定します。
property 必須 Variant プロパティ名を指定
value 必須 Variant 値を設定

Return Value

Name Data type Description
var Object 新しいDictionaryのインスタンス(IDictionary I/F)

Remarks

SetProperty I/F のメソッドです。
指定プロパティキーに値を設定する。

Example

  • None

See also


2.3.10.19 GetProperty(ICompatibleProperty I/F)

Syntax

Set var = expression.GetProperty()

Parameters

Name Required/Optional Data type Description
expression 必須 ICompatibleProperty ICompatibleProperty I/F を指定します。

Return Value

Name Data type Description
var Object 新しいDictionaryのインスタンス(IDictionary I/F)

Remarks

GetProperty I/F のメソッドです。
指定プロパティキーの値を取得する。

Example

  • None

See also

目次

1 使用方法

1.1 ICursor 系コマンドの使い方
1.2 StringBuilderの使い方
1.3 Messageクラスの使い方
1.4 Usingクラスの使い方
1.5 CSV Parser の使い方
1.6 ArrayListとDictionaryのシリアライズ化
1.7 ArrayListとDictionaryのデシリアライズ化
1.8 PowerQueryのM言語組み立て

2 リファレンス

2.1 標準モジュール

2.1.1 CallbackHelper
2.1.2 Document

2.2 インターフェイス

2.2.1 IAppInfo
2.2.2 IBookReader
2.2.3 IComparer
2.2.4 ICursor
2.2.5 IDictionary
2.2.6 IFormManager
2.2.7 IGDIPlus
2.2.8 IList
2.2.9 ILogger
2.2.10 IMCommand
2.2.11 INewInstance
2.2.12 IParam
2.2.13 IReader
2.2.14 IRegistry
2.2.15 IStringBuilder
2.2.16 IUsing
2.2.17 IUsingArgs
2.2.18 IValueObject
2.2.19 IWriter

2.3 クラス

2.3.1 ArrayList
2.3.2 Arrays
2.3.3 BookReader
2.3.4 CsvReader
2.3.5 CharCursor
2.3.6 CheckDigit
2.3.7 Clipboard
2.3.8 CsvWriter
2.3.9 Dialog
2.3.10 Dictionary
2.3.11 ExcelUtils
2.3.12 ExplorerComparer
2.3.13 FileIO
2.3.14 FormManager
2.3.15 GDIPlus
2.3.16 Graphics
2.3.17 IniFile
2.3.18 LinkedList
2.3.19 Logger
2.3.20 MCommand
2.3.21 MCsv
2.3.22 MFile
2.3.23 MList
2.3.24 MRecord
2.3.25 MTable
2.3.26 MatchBean
2.3.27 Math
2.3.28 NewExcel
2.3.29 NewPowerPoint
2.3.30 NewWord
2.3.31 Objects
2.3.32 OneTimeSpeedBooster
2.3.33 OrderedDictionary
2.3.34 Parser
2.3.35 Process
2.3.36 RangeCursor
2.3.37 RegExp
2.3.38 Registry
2.3.39 SampleVO
2.3.40 SheetCursor
2.3.41 SortedDictionary
2.3.42 Stack
2.3.43 StrSch
2.3.44 StringBuilder
2.3.45 StringEx
2.3.46 StringUtils
2.3.47 SystemInfo
2.3.48 TableCursor
2.3.49 TaskTrayView
2.3.50 TextReader
2.3.51 TextWriter
2.3.52 Using
2.3.53 Web
2.3.54 Zip

Clone this wiki locally