ジャンプ先: 概要. 戻り値. フラグ. MEL 例.
stringArrayIntersector [-allowDuplicates boolean] [-defineTemplate string] [-exists] [-intersect string[]] [-reset] [-useTemplate string]
string
stringArrayIntersector は、取り消し可能、照会可能、および編集可能です。
stringArrayIntersecto コマンドは、大きな文字配列を効率よくインターセクトすることを可能にするオブジェクトを作成および編集します。インターセクタ オブジェクトは、「これまでのインターセクト」の情報を維持し、新しい文字配列が -i/intersect フラグを使用して与えられたときに、インターセクトを更新します。
文字列の部門(インターセクタ)オブジェクトは、deleteUI コマンドを使用して削除できる場合があります。
照会モードでは、戻り値のタイプは照会されたフラグに基づきます。
allowDuplicates, defineTemplate, exists, intersect, reset, useTemplate
| ロング ネーム(ショート ネーム) |
引数タイプ |
プロパティ |
-exists(-ex)
|
|
|
|
指定したオブジェクトが存在するかどうかによって、true または false を返します。他のフラグは無視されます。
|
|
-defineTemplate(-dt)
|
string
|
|
|
他の任意のフラグと引数を解析し、かつ引数で指定したコマンド テンプレートに追加するモードに、コマンドのモードを変更します。templateName が現在のテンプレートとして設定されていれば、その後コマンドが実行されるたびに、この引数が既定の引数として使用されます。
|
|
-useTemplate(-ut)
|
string
|
|
|
コマンドに、現在以外のコマンド テンプレートの使用を強制します。
|
|
-allowDuplicates(-ad)
|
boolean
|
|
|
インターセクタを入力配列で複製させる(true)か、またはすべての複製エントリを単一の固有エントリに結合する(false)必要があります。このフラグは、インターセクタを初めて作成する場合に使用する必要があります。既定は false です。
|
|
-intersect(-i)
|
string[]
|

|
|
インターセクタによって維持されている現在のインターセクトによって、指定した文字配列をインターセクトします。
|
|
-reset(-r)
|
|
|
|
インターセクタをリセットし、新しいインターセクトを開始します。
|
|
フラグはコマンドの作成モードで表示できます
|
フラグはコマンドの編集モードで表示できます
|
フラグはコマンドの照会モードで表示できます
|
コマンド内でフラグを複数回使用できます。
|
// Create an intersector
//
string $myIntersector = `stringArrayIntersector`;
// Intersect some string arrays using the intersector
//
string $initialArray[] = {"Excellent", "Smithers", "doh"};
stringArrayIntersector -edit -intersect $initialArray $myIntersector;
stringArrayIntersector -edit -intersect {"Smithers", "Homer"} $myIntersector;
// Query the intersector to see what the intersection is so far
//
stringArrayIntersector -query $myIntersector;
// Result: Smithers //
// Reset the intersector so that you can use it again with new string
// arrays
//
stringArrayIntersector -edit -reset $myIntersector;
// Delete the intersector as we are now done with it
//
deleteUI $myIntersector;