TLookupStringList class
Implements an unsorted StringList with a fast lookup feature.
Declaration
TLookupStringList = class(TStringList)Inheritance
- TLookupStringList
- TStringList
- TObject
Description
TLookupStringList is a
TStringList descendant that
implements an unsorted string list with a fast lookup feature. Internally it
uses a map container,
TStringMap from unit
AvgLvlTree,
which is a balanced tree. The strings are stored in 2 places, in the string list
itself and in the map container. The map is used in
Contains,
IndexOf and
Find methods. The map container does not
reserve too much memory because the strings are reference counted and not copied.
All values for the Duplicates property are fully supported, including
dupIgnore and dupError (unlike in unsorted TStringList class).
This class is useful when you must preserve the order in list, but also need to do fast lookups to see if a string exists, or must prevent duplicates.
Authors: Juha Manninen / Antônio Galvão
See also
Methods
InsertItem | protected | Adds a new value to the items and the string map with duplicate enforcement. |
Create | public | Constructor for the class instance. |
Destroy | public | Destructor for the class instance. |
Assign | public | Implements object persistence in the class. |
Clear | public | Clears the content stored in the class instance. |
Delete | public | Deletes the value at the specified position. |
Add | public | Adds the specified value to the Strings in the list. |
AddObject | public | Adds the specified values to the Strings and Objects in the list. |
Contains | public | Determines if the specified value already exists in the string map. |
Find | public | Locates the specified value in the Strings property. |
IndexOf | public | Gets the position in Strings where the specified value is stored. |
Inherited
From TObject (40)
AfterConstruction BeforeDestruction CheckDisposed ClassInfo ClassName ClassNameIs ClassParent ClassType CleanupInstance DefaultHandler DefaultHandlerStr Dispatch DispatchStr Disposed DisposeOf Equals FieldAddress Free FreeInstance GetDisposed GetHashCode GetInterface GetInterfaceByStr GetInterfaceEntry GetInterfaceEntryByStr GetInterfaceTable GetInterfaceWeak GetLastCastErrorInfo InheritsFrom InitInstance InstanceSize MethodAddress MethodName newinstance QualifiedClassName SafeCallException StringMessageTable SystemHasExtendedRTTI ToString UnitName
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
