API:System.Generics.Collections.TObjectList.Create
Delphi
constructor Create; overload;
constructor Create(AOwnsObjects: Boolean); 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()/* overload */;
__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(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) { }
/* {System_Generics_Collections}TList<System_Generics_Collections_TObjectList<T>_T>.Create */ inline __fastcall TObjectList__1(const System::DelphiInterface<System::IEnumerable__1<T> > Collection)/* overload */ : TList__1<T>(Collection) { }
/* {System_Generics_Collections}TList<System_Generics_Collections_TObjectList<T>_T>.Create */ inline __fastcall TObjectList__1(const T *Values, const System::NativeInt Values_High)/* overload */ : TList__1<T>(Values, Values_High) { }
Eigenschaften
Typ | Sichtbarkeit | Quelle | Unit | Übergeordnet |
---|---|---|---|---|
constructor | public | System.Generics.Collections.pas System.Generics.Collections.hpp |
System.Generics.Collections | TObjectList |
Beschreibung
Erzeugt und initialisiert eine Listeninstanz.
System.Generics.Collections.TObjectList.Create erbt von System.Generics.Collections.TList.Create. Der folgende Inhalt bezieht sich auf System.Generics.Collections.TList.Create.
Erzeugt und initialisiert eine Listeninstanz.
Diese überladene Methode erzeugt und initialisiert eine Listeninstanz.
AComparer ist eine Vergleichsfunktion. Wird sie nicht bereitgestellt, wird die Standardvergleichsfunktion für den Typ verwendet.
Collection ist eine Kollektion, mit der die Liste initialisiert werden soll. Die Objekte werden in derselben Reihenfolge wie in Collection hinzugefügt. Wenn Collection angegeben ist, ist Create eine O(n)-Operation, wobei n die Anzahl der Einträge in Collection ist.