Class TIntegerList (unit IntList) |
Inherits from
TPersistent
constructor Create;
- ==========================} {== TIntegerList Methods ==} {==========================
function Add( Value : Integer ) : Integer;
procedure AddIntegers( List : TIntegerList );
= TIntegerList.
procedure Assign( Source : TPersistent );
Don't forget to free the container
procedure Clear;
procedure Delete( Index : Integer );
destructor Destroy;
Create internal list to hold integers
function Equals( List : TIntegerList ) : Boolean;
procedure Exchange( Index1, Index2 : Integer);
= TIntegerList.
function IndexOf( N : Integer ) : Integer;
= TIntegerList.
procedure Insert( Index : Integer; Value : Integer );
= TIntegerList.
procedure Move( CurIndex, NewIndex : Integer );
Insert integer onto internal list
procedure DefineProperties( Filer : TFiler );
=========================================================================
TIntegerList.
function Find( N : Integer; var Index : Integer ) : Boolean;
=========================================================================
Find
A protected method that implements a binary search function that is
called by IndexOf only if the list is sorted.
function GetItem( Index : Integer ) : Integer;
procedure SetItem( Index : Integer; Value : Integer );
procedure Sort;
= TIntegerList.
function GetCount : Integer;
procedure QuickSort( L, R : Integer );
procedure ReadIntegers( Reader : TReader );
procedure ReadMax( Reader : TReader );
procedure ReadMin( Reader : TReader );
If form inheritance is being used, then only store integers if they differ from the ancestor property list.
procedure SetMax( Value : Integer );
= TIntegerList.
procedure SetMin( Value : Integer );
procedure SetSorted( Value : Boolean );
Store the end of list marker
procedure WriteIntegers( Writer : TWriter );
Read in the end of list marker
procedure WriteMax( Writer : TWriter );
procedure WriteMin( Writer : TWriter );
property Count : Integer
property Duplicates : TDuplicates
property Items : Integer
property Max : Integer
property Min : Integer
property Sorted : Boolean
FDuplicates : TDuplicates;
FList : TList;
FMax : Integer;
FMin : Integer;
FSorted : Boolean;
constructor Create;
==========================} {== TIntegerList Methods ==} {==========================
function Add( Value : Integer ) : Integer;
procedure AddIntegers( List : TIntegerList );
= TIntegerList.SetMax =
procedure Assign( Source : TPersistent );
Don't forget to free the container
procedure Clear;
procedure Delete( Index : Integer );
destructor Destroy;
Create internal list to hold integers
function Equals( List : TIntegerList ) : Boolean;
procedure Exchange( Index1, Index2 : Integer);
= TIntegerList.Equals =
function IndexOf( N : Integer ) : Integer;
= TIntegerList.Find =
procedure Insert( Index : Integer; Value : Integer );
= TIntegerList.IndexOf =
procedure Move( CurIndex, NewIndex : Integer );
Insert integer onto internal list
procedure DefineProperties( Filer : TFiler );
=========================================================================
TIntegerList.DefineProperties
This method instructs Delphi to include the Min and Max property values
whenever a TIntegerList object is read from or written to a stream
(e.g. a form file). This method also ensures that the list of integers
gets stored in the stream as well.
=========================================================================
function Find( N : Integer; var Index : Integer ) : Boolean;
=========================================================================
Find
A protected method that implements a binary search function that is
called by IndexOf only if the list is sorted.
=========================================================================
function GetItem( Index : Integer ) : Integer;
procedure SetItem( Index : Integer; Value : Integer );
procedure Sort;
= TIntegerList.QuickSort =
function GetCount : Integer;
procedure QuickSort( L, R : Integer );
procedure ReadIntegers( Reader : TReader );
procedure ReadMax( Reader : TReader );
procedure ReadMin( Reader : TReader );
If form inheritance is being used, then only store integers if they differ from the ancestor property list.
procedure SetMax( Value : Integer );
= TIntegerList.SetMin =
procedure SetMin( Value : Integer );
procedure SetSorted( Value : Boolean );
Store the end of list marker
procedure WriteIntegers( Writer : TWriter );
Read in the end of list marker
procedure WriteMax( Writer : TWriter );
procedure WriteMin( Writer : TWriter );
property Count : Integer
property Duplicates : TDuplicates
property Items : Integer
property Max : Integer
property Min : Integer
property Sorted : Boolean
FDuplicates : TDuplicates;
FList : TList;
FMax : Integer;
FMin : Integer;
FSorted : Boolean;