[Overview][Classes][Index] |
[Properties (by Name)] [Methods (by Name)] [Events (by Name)]
Implements a specialization of TFPGList for Integer data types.
Source position: integerlist.pas line 40
public |
||
procedure Sort; overload; |
|
Sorts the Integer values stored in the list. |
end; |
|
Implements a specialization of TFPGList for Integer data types. |
|
| | ||
? | ||
TObject |
TIntegerList provides an overloaded Sort method to ensure that values in the list are handled using a compare function that operates on Integer values. Internally, it provides a TFPGListEnumerator which is specialized for the Integer type used in the implementation.
Use the properties and methods defined in the ancestor class to perform common operations for Integer values, including:
Items is the default property, and allows access to values by ordinal position or by using an enumerator to traverse the Integer values in List.
Examples:
// using TIntegerList properties and methods // var // AIntegerList: TIntegerList; // AIndex, ACount: Integer; // AMax, AValue: Integer; AIntegerList := TIntegerList.Create; AMax := High(Integer); AIntegerList.Add(Random(AMax)); AIntegerList.Add(Random(AMax)); AIntegerList.Add(Random(AMax)); AIntegerList.Add(Random(AMax)); AIntegerList.Insert(2, 42); AIntegerList.Sort; ACount := AIntegerList.Count; AIndex := AIntegerList.IndexOf(AIntegerList.Last); AValue := AIntegerList.Last; AIntegerList.Last := AValue - 1; AValue := AIntegerList.Extract(AInt64List.First); AIndex := AIntegerList.Remove(42); AIntegerList.Clear; AIntegerList.Free;
An example using TIntegerList can be found in the implementation of the TCustomGrid class in lcl/grids.pas.
|
Implements a specialization of TFPGList for the Byte data type. |
|
|
Implements a specialization of TFPGList for the Word data type. |
|
|
Implements a specialization of TFPGList for Cardinal data types. |
|
|
Implements a specialization of TFPGList for Int64 data types. |
|
|
Sorts the Integer values stored in the list. |
|
Version 3.2 | Generated 2024-02-25 | Home |