TObjectArray class
Implements an array of items with their associated objects.
Declaration
TObjectArray<TItem,TObj> = classDescription
TObjectArray is a generic type used to implement an array of items
and their associated objects. TObjectArray allows the association to be
defined using the TItem and TObj class types. Internally, it uses a list of
records with pointers to the
Items and
Objects stored
in the class. Properties and methods are provided to maintain and access the
entries in the class instance, and the allocated storage for the array type.
See also
Properties
Capacity | public | Specifies the number of associations that can be stored in the List. |
Count | public | Number of item/object associations currently stored in the List. |
Items | public | Provides indexed access to the TItem class instances stored in the List. |
Objects | public | Provides indexed access to the TObj class instances stored in the List. |
List | public | Provides access to the list which implements the storage for the item/object associations in the class instance. |
Methods
Get | protected | Gets the value for the Items property. |
Put | protected | Sets the value for the Items property. |
GetObject | protected | Gets the value for the Objects property. |
PutObject | protected | Sets the value for the Objects property. |
SetCapacity | protected | Sets the value for the Capacity property. |
SetCount | protected | Sets the value for the Count property. |
Grow | protected | Increases the storage Capacity for the class instance. |
Shrink | protected | Decreases the Capacity and allocated storage for the class instance. |
Destroy | public | Destructor for the class instance. |
Add | public | Adds the specified item to the storage for the class instance. |
AddObject | public | Adds the specified item and its associated object to the storage in the class instance. |
Clear | public | Removes all item/object associations stored in the List. |
Delete | public | Deletes an item/object association stored at the specified position in the List. |
Exchange | public | Swaps the item/object associations at the specified positions in List. |
First | public | Gets the first TItem class instance in the List, or Nil when empty. |
IndexOf | public | Gets the ordinal position in List where the specified TItem instance is stored. |
Insert | public | Inserts a new association at the specified position in List. |
InsertObject | public | Inserts an item/object association at the specified position in the List. |
Last | public | Gets the last TItem instance in the List, or Nil when empty. |
Move | public | Relocates the association stored at the position in CurIndex to the position in NewIndex. |
Assign | public | Assigns TItem class instances specified in SrcList to the List storage in the class. |
Remove | public | Removes the association with the specified TItem class instance. |
Pack | public | Removes all associations where the Item class instance is unassigned (contains Nil). |
An experiment, built from Lazarus main 2dfa93c66e of 10-22-2026. Not the official Lazarus documentation.
