type TExContainerType = class(
TAnsiStringBase04ZeroVector
)
TAnsiStringCardinalVector
.TAnsiStringBase04ZeroVector
> TAnsiStringBase04Vector
> TAnsiStringVector
> TExContainerType
> TBase04ZeroVector
> TBase04Vector
> TExVector
> TExContainer
> TErrorObject
None.
function ExistAllNumbers(const ANumbers: array of TExNumberType): Boolean; |
Returns True
if all of the ANumbers
in the array exist in the Items' Number Elements of the container, otherwise returns False
. Comparison starts with the first Item.
function ExistAnyNumbers(const ANumbers: array of TExNumberType): Boolean; |
Returns True
if at least one of the ANumbers
in the array exists in the Items' Number Elements of the container, otherwise returns False
. Comparison starts with the first Item.
function ExistsBackNumber(const ANumber: TExNumberType): Boolean; |
Returns True if ANumber
exists among the Items' Number Elements of the container, otherwise returns False. Comparison starts with the last Item.
function ExistsNumber(const ANumber: TExNumberType): Boolean; |
Returns True if ANumber
exists among the Items' Number Elements of the container, otherwise returns False. Comparison starts with the first Item.
function ExistsSortedNumber(const Number: TExNumberType): Boolean; |
function FindDescNumber(const ANumber: TExNumberType; out Index: Integer): Boolean; |
function FindNumber(const Number: TExNumberType; out Index: Integer): Boolean; |
function GetFirstNumber: TExNumberType; |
Returns the Number Element of the first Item in the container.
function GetLastNumber: TExNumberType; |
Returns the Number Element of the last Item in the container.
function GetNameBackOfNumber(const ANumber: TExNumberType): TExNameType; |
Looks for the last occurrence of an Item whose Number Element is the same as Number
. If found, returns the Name Element of that Item. If not found, an empty string is returned.
function GetNameOfNumber(const ANumber: TExNumberType): TExNameType; |
Looks for the first occurrence of an Item whose Number Element is the same as Number
. If found, returns the Name Element of that Item. If not found, an empty string is returned.
function GetNumber(const Item: Pointer): TExNumberType; |
Returns the Number Element of the Item pointed to by Item
.
function GetNumberAt(const Index: Integer): TExNumberType; |
Returns the Number Element of the Item referenced by a 0-based Index
.
function IndexBackOfNumber(const ANumber: TExNumberType): Integer; |
Returns the position of the last occurrence of an Item whose Number Element is the same as ANumber
. IndexBackOfNumber
returns the 0-based Index of the Item, i.e. 0 for the first Item, 1 for the second, and so on. If ANumber
is not in the vector, IndexBackOfNumber
returns -1.
function IndexOfNumber(const ANumber: TExNumberType): Integer; |
Returns the position of the first occurrence of an Item whose Number Element is the same as ANumber
. IndexOfNumber
returns the 0-based Index of the Item, i.e. 0 for the first Item, 1 for the second, and so on. If ANumber
is not in the vector, IndexOfNumber
returns -1.
function InsertNameNumberLast(const AName: TExNameType; const ANumber: TExNumberType): Integer; |
Inserts a new Item to the end of the vector and stores AName
and ANumber
to the new Item's Name and Number Elements respectively. InsertNameNumberLast
returns the Index position of the new Item in the vector, where the first Item in the vector has an Index of 0.
function InsertNameNumberSortedByNameCI(const AName: TExNameType; const ANumber: TExNumberType): Integer; |
Inserts a new Item at the appropriate position to a vector already sorted by its Items' Name Elements in ascending order. The new position will be based on comparisons with AName
. The comparison is case insensitive.
InsertNameNumberSortedByNameCI
does not allow duplicates in the vector. If AName
is already present in the vector, no new Item will be inserted and AName
and ANumber
will not be stored.
InsertNameNumberSortedByNameCI
returns the Index position of the new Item in the vector, where the first Item i n the vector has an Index of 0. If no new Item has been added (to avoid duplicates), the result will be -1.
function InsertNameNumberSortedByNameCS(const AName: TExNameType; const ANumber: TExNumberType): Integer; |
Inserts a new Item at the appropriate position to a vector already sorted by its Items' Name Elements in ascending order. The new position will be based on comparisons with AName
. The comparison is case sensitive.
InsertNameNumberSortedByNameCS
does not allow duplicates in the vector. If AName
is already present in the vector, no new Item will be inserted and AName
and ANumber
will not be stored.
InsertNameNumberSortedByNameCS
returns the Index position of the new Item in the vector, where the first Item in the vector has an Index of 0. If no new Item has been added (to avoid duplicates), the result will be -1.
procedure InsertNumberAt(const Index: Integer; const ANumber: TExNumberType); |
Inserts a new Item at the position specified by Index
and stores ANumber
to the new Item's Number Element.
function InsertNumberFirst(const Number: TExNumberType): Integer; |
Inserts a new Item to the beginning of the vector and stores Number
to the new Item's Number Element. InsertNumberFirst
returns the Index position of the new Item in the vector, where the first Item in the vector has an Index of 0.
function InsertNumberLast(const Number: TExNumberType): Integer; |
Inserts a new Item to the end of the vector and stores Number
to the new Item's Number Element. InsertNumberLast
returns the Index position of the new Item in the vector, where the first Item in the vector has an Index of 0.
function InsertNumberSorted(const ANumber: TExNumberType): Integer; |
Inserts a new Item at the appropriate position to a vector already sorted by its Items' Number Elements in ascending order. The new position will be based on comparisons with ANumber
.
AddNumberSorted
relies on the vector to be in sorted order already; do not use it on unsorted vectors. Call SortByNumber
to prepare an unsorted vector for using AddNumberSorted
.
AddNumberSorted
does not allow duplicates in the vector. If ANumber
is already present in the vector, no new Item will be inserted and ANumber
will not be stored.
AddNumberSorted
returns the Index position of the new Item in the vector, where the first Item in the vector has an Index of 0. If no new Item has been added (to avoid duplicates), the result will be -1.
function InsertNumberSortedDesc(const ANumber: TExNumberType): Integer; |
Inserts a new Item at the appropriate position to a vector already sorted by its Items' Number Elements in descending order. The new position will be based on comparisons with ANumber
.
AddNumberSortedDesc
relies on the vector to be in sorted order already; do not use it on unsorted vectors. Call SortByNumberDesc
to prepare an unsorted vector for using AddNumberSortedDesc
.
AddNumberSortedDesc
does not allow duplicates in the vector. If ANumber
is already present in the vector, no new Item will be inserted and ANumber
will not be stored.
AddNumberSortedDesc
returns the Index position of the new Item in the vector, where the first Item in the vector has an Index of 0. If no new Item has been added (to avoid duplicates), the result will be -1.
function ItemOfNumber(const Number: TExNumberType): Pointer; |
procedure RemoveAllNumbers(const ANumber: TExNumberType); |
Removes all Items whose Number Element is the same as ANumber
from the container.
procedure RemoveBackAllNumbers(const ANumber: TExNumberType); |
Removes all Items whose Number Element is the same as ANumber
from the container starting at the last Item.
procedure SetFirstNumber(const Number: TExNumberType); |
Stores Number
to the Number Element of the first Item in the container.
procedure SetLastNumber(const Number: TExNumberType); |
Stores Number
to the Number Element of the last Item in the container.
procedure SetNameBackOfNumber(const ANumber: TExNumberType; const AName: TExNameType); |
Looks for the last occurrence of an Item whose Number Element is the same as Number
. If found, Name
is stored to the Name Element of that Item. If not found, Name
will not be stored.
procedure SetNameOfNumber(const ANumber: TExNumberType; const AName: TExNameType); |
Looks for the first occurrence of an Item whose Number Element is the same as Number
. If found, Name
is stored to the Name Element of that Item. If not found, Name
will not be stored.
procedure SetNumber(const Item: Pointer; const Number: TExNumberType); |
Stores Number
to the Number Element of the Item pointed to by Item
.
procedure SetNumberAt(const Index: Integer; const Number: TExNumberType); |
Stores Number
to the Number Element of the Item referenced by a 0-based Index
.
procedure SortByNumber; |
Sorts all Items in the container by their Number Element in ascending order.
procedure SortByNumberDesc; |
Sorts all Items in the container by their Number Element in descending order.
FirstNumber: TExNumberType; |
LastNumber: TExNumberType; |
NameBackOfNumber[const Number: TExNumberType]: TExNameType; |
NameOfNumber[const Number: TExNumberType]: TExNameType; |
Number[const Item: Pointer]: TExNumberType; |
NumberAt[const Index: Integer]: TExNumberType; |
FirstNumber: TExNumberType; |
Reads or modifies the Number Element of the first Item in the container.
LastNumber: TExNumberType; |
Reads or modifies the Number Element of the last Item in the container.
NameBackOfNumber[const Number: TExNumberType]: TExNameType; |
NameOfNumber[const Number: TExNumberType]: TExNameType; |
Number[const Item: Pointer]: TExNumberType; |
Reads or writes the Number Element of the Item pointed to by Item
.
NumberAt[const Index: Integer]: TExNumberType; |
Lists the Number Element of the container's Items, referenced by a 0-based Index
. Use Numbers
to read or modify the Number Element of an Item at a particular position. Index
gives the position of the Item, where 0 is the position of the first Item, 1 is the position of the second Item, and so on.