ジャンプ先: 概要. 戻り値. フラグ. MEL 例.

概要

stringArrayIntersector [-allowDuplicates boolean] [-defineTemplate string] [-exists] [-intersect string[]] [-reset] [-useTemplate string] string

stringArrayIntersector は、取り消し可能、照会可能、および編集可能です。

stringArrayIntersecto コマンドは、大きな文字配列を効率よくインターセクトすることを可能にするオブジェクトを作成および編集します。インターセクタ オブジェクトは、「これまでのインターセクト」の情報を維持し、新しい文字配列が -i/intersect フラグを使用して与えられたときに、インターセクトを更新します。

文字列の部門(インターセクタ)オブジェクトは、deleteUI コマンドを使用して削除できる場合があります。

戻り値

stringインターセクタの名前。

照会モードでは、戻り値のタイプは照会されたフラグに基づきます。

フラグ

allowDuplicates, defineTemplate, exists, intersect, reset, useTemplate
ロング ネーム(ショート ネーム) 引数タイプ プロパティ
-allowDuplicates(-ad) boolean create
インターセクタを入力配列で複製させる(true)か、またはすべての複製エントリを単一の固有エントリに結合する(false)必要があります。このフラグは、インターセクタを初めて作成する場合に使用する必要があります。既定は false です。
-defineTemplate(-dt) string create
他の任意のフラグと引数を解析し、かつ引数で指定したコマンド テンプレートに追加するモードに、コマンドのモードを変更します。 templateName が現在のテンプレートとして設定されていれば、その後コマンドが実行されるたびに、この引数が既定の引数として使用されます。
-exists(-ex) create
指定したオブジェクトが存在するかどうかを返します。他のフラグは無視されます。
-intersect(-i) string[] createedit
インターセクタによって維持されている現在のインターセクトによって、指定した文字配列をインターセクトします。
-reset(-r) edit
インターセクタをリセットし、新しいインターセクトを開始します。
-useTemplate(-ut) string create
コマンドに、現在のものとは異なるコマンド テンプレートを使用するように強制します。

フラグはコマンドの作成モードで表示できます フラグはコマンドの編集モードで表示できます
フラグはコマンドの照会モードで表示できます コマンド内でフラグを複数回使用できます。

MEL 例

// 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;