System.Generics.Collections.TObjectList.Create

提供: RAD Studio API Documentation
移動先: 案内検索

Delphi

constructor Create(AOwnsObjects: Boolean = True); overload;
constructor Create(const AComparer: IComparer<T>; AOwnsObjects: Boolean = True); overload;
constructor Create(const Collection: TEnumerable<T>; AOwnsObjects: Boolean = True); overload;

C++

__fastcall TObjectList__1(bool AOwnsObjects)/* overload */;
__fastcall TObjectList__1(const System::DelphiInterface<System::Generics::Defaults::IComparer__1<T> > AComparer, bool AOwnsObjects)/* overload */;
__fastcall TObjectList__1(TEnumerable__1<T>* const Collection, bool AOwnsObjects)/* overload */;
/* {System_Generics_Collections}TList<System_Generics_Collections_TObjectList<T>_T>.Create */ inline __fastcall TObjectList__1(void)/* overload */ : TList__1<T>() { }
/* {System_Generics_Collections}TList<System_Generics_Collections_TObjectList<T>_T>.Create */ inline __fastcall TObjectList__1(const System::DelphiInterface<System::Generics::Defaults::IComparer__1<T> > AComparer)/* overload */ : TList__1<T>(AComparer) { }
/* {System_Generics_Collections}TList<System_Generics_Collections_TObjectList<T>_T>.Create */ inline __fastcall TObjectList__1(TEnumerable__1<T>* const Collection)/* overload */ : TList__1<T>(Collection) { }

プロパティ

種類 可視性 ソース ユニット
constructor public
System.Generics.Collections.pas
System.Generics.Collections.hpp
System.Generics.Collections TObjectList

説明

TObjectList インスタンスを作成します。

このオーバーロードされたメソッドは、TObjectList インスタンスを作成します。

AOwnsObjects パラメータは、オブジェクト エントリがリストに所有されているかどうかを示す論理値です。オブジェクトが所有されている場合、エントリがリストから削除されると、オブジェクトが開放されます。OwnsObjects プロパティは、このパラメータの値から設定されます。デフォルトは true です。

Collection は、リストを初期化するためのコレクションです。オブジェクトは、Collection と同じ順序で追加されます。Collection が指定されている場合、インスタンスの作成は O(n)(n は、Collection 内の項目数)操作になります。

AComparer は、等値比較関数です。この関数が提供されない場合、その型のデフォルトの比較関数が使用されます。

関連項目