Class TGenTreeSet

DescriptionHierarchyInternal TypesFieldsMethodsProperties

Unit

Declaration

type generic TGenTreeSet<_TItem_> = class(TAbstractTreeSet)

Description

no description available, TAbstractTreeSet description follows
no description available, TContainer description follows

Hierarchy

Overview

Internal Types

Published TCompareItems = function (const A, B: _TItem_) : Integer of object;
Public TEnumerator = specialize TGenEnumerator<_TItem_, TTreeSetCursor>;
Published TItemToString = function (const Item: _TItem_) : String of object;

Methods

Public function Ceiling(const Item: _TItem_) : TTreeSetCursor;
Public procedure Clear;
Public function Contains(const Item: _TItem_) : Boolean;
Public constructor Create;
Public function DefaultCompareItems(const A, B: _TItem_) : Integer; virtual;
Public function DefaultItemToString(const Item: _TItem_) : String; virtual;
Public procedure Delete(const Item: _TItem_);
Public procedure DeleteAt(const Position: TTreeSetCursor);
Public procedure DeleteFirst;
Public procedure DeleteLast;
Public destructor Destroy; override;
Public procedure Difference(Left, Right: TGenTreeSet);
Public procedure Exclude(const Item: _TItem_);
Public procedure ExcludeAll(ASet: TGenTreeSet);
Public function First: TTreeSetCursor;
Public function FirstItem: _TItem_;
Public function Floor(const Item: _TItem_) : TTreeSetCursor;
Public function GetEnumerator : TEnumerator;
Public function GetItemAt(const Position: TTreeSetCursor): _TItem_;
Public procedure Include(const Item: _TItem_);
Public procedure IncludeAll(ASet: TGenTreeSet);
Public procedure Insert(const Item: _TItem_);
Public procedure Insert(const Item: _TItem_; out Inserted: Boolean);
Public procedure Intersection(Left, Right: TGenTreeSet);
Public function IsEmpty: Boolean; inline;
Public function IsSubset(OfSet: TGenTreeSet) : Boolean;
Public function Last: TTreeSetCursor;
Public function LastItem: _TItem_;
Public function Overlaps(ASet: TGenTreeSet) : Boolean;
Public procedure ReadFirstItem(out Value : _TItem_); inline;
Public procedure ReadItemAt(const Position: TTreeSetCursor; out Value: _TItem_);
Public procedure ReadLastItem(out Value : _TItem_); inline;
Public procedure SymmetricDifference(Left, Right: TGenTreeSet);
Public function ToString : String; override;
Public procedure Union(Left, Right: TGenTreeSet);

Properties

Public property Items[constPosition:TTreeSetCursor]: _TItem_ read GetItemAt;
Public property NilCursor: TTreeSetCursor read fNilCursor;
Public property OnCompareItems : TCompareItems read GetOnCompareItems write SetOnCompareItems;
Public property OnItemToString : TItemToString read GetOnItemToString write SetOnItemToString;
Public property Size : Integer read GetSize;

Description

Internal Types

Published TCompareItems = function (const A, B: _TItem_) : Integer of object;
 
Public TEnumerator = specialize TGenEnumerator<_TItem_, TTreeSetCursor>;
 
Published TItemToString = function (const Item: _TItem_) : String of object;
 

Methods

Public function Ceiling(const Item: _TItem_) : TTreeSetCursor;

Searches for the first item which is not less than Item. If such an item is found, a cursor that designates it is returned. Otherwise NilCursor is returned.

Public procedure Clear;

Removes all the items from the container.

Public function Contains(const Item: _TItem_) : Boolean;

Returns true if the container contains Item.

Public constructor Create;

Creates an empty tree set.

Public function DefaultCompareItems(const A, B: _TItem_) : Integer; virtual;
 
Public function DefaultItemToString(const Item: _TItem_) : String; virtual;
 
Public procedure Delete(const Item: _TItem_);

Checks if Item is present in the container. If a match is found, removes the element from the set. Otherwise, raises an exception.

Public procedure DeleteAt(const Position: TTreeSetCursor);

Deletes the item designated by Position.

Public procedure DeleteFirst;

Deletes the first item.

Public procedure DeleteLast;

Deletes the last item.

Public destructor Destroy; override;
 
Public procedure Difference(Left, Right: TGenTreeSet);

Clears Self and then adds to Self all the items of Left that are not present in Right.

Public procedure Exclude(const Item: _TItem_);

Checks if Item is present in the container. If a match is found, removes the item from the set.

Public procedure ExcludeAll(ASet: TGenTreeSet);

Excludes all the items of ASet.

Public function First: TTreeSetCursor;

Returns a cursor that designates the first element of the container or NilCursor if the container is empty.

Public function FirstItem: _TItem_;

Returns the first Item.

Public function Floor(const Item: _TItem_) : TTreeSetCursor;

Searches for the last item which is not greater than Item. If such an item is found, a cursor that designates it is returned. Otherwise NilCursor is returned.

Public function GetEnumerator : TEnumerator;
 
Public function GetItemAt(const Position: TTreeSetCursor): _TItem_;
 
Public procedure Include(const Item: _TItem_);

Checks if Item is present in the container. If no match is found, inserts the item into the set.

Public procedure IncludeAll(ASet: TGenTreeSet);

Includes all the items of ASet.

Public procedure Insert(const Item: _TItem_);

Checks if Item is present in the container. If no match is found, inserts the item into the set. Otherwise, raises an exception.

Public procedure Insert(const Item: _TItem_; out Inserted: Boolean);

Checks if Item is present in the container. If no match is found, inserts the item into the set and sets Inserted to true. Otherwise, sets Inserted to false.

Public procedure Intersection(Left, Right: TGenTreeSet);

Clears Self and then adds to Self all the items of Left that are present in Right.

Public function IsEmpty: Boolean; inline;

Returns true if the set is empty.

Public function IsSubset(OfSet: TGenTreeSet) : Boolean;

Returns true if all the items in Self are present in OfSet.

Public function Last: TTreeSetCursor;

Returns a cursor that designates the last element of the container or NilCursor if the container is empty.

Public function LastItem: _TItem_;

Returns the last Item.

Public function Overlaps(ASet: TGenTreeSet) : Boolean;

Returns true if at least one item of Self is present in ASet.

Public procedure ReadFirstItem(out Value : _TItem_); inline;
 
Public procedure ReadItemAt(const Position: TTreeSetCursor; out Value: _TItem_);
 
Public procedure ReadLastItem(out Value : _TItem_); inline;
 
Public procedure SymmetricDifference(Left, Right: TGenTreeSet);

Clears Self and then adds to Self all the items of Left that are not present in Right all the items of Right that are not present in Left.

Public function ToString : String; override;

Return a string representation for the container.

Public procedure Union(Left, Right: TGenTreeSet);

Clears Self and then adds to Self all the items of Left and all the items of Right.

Properties

Public property Items[constPosition:TTreeSetCursor]: _TItem_ read GetItemAt;

Provides access to the items in the container.

Public property NilCursor: TTreeSetCursor read fNilCursor;

A nil cursor.

Public property OnCompareItems : TCompareItems read GetOnCompareItems write SetOnCompareItems;
 
Public property OnItemToString : TItemToString read GetOnItemToString write SetOnItemToString;
 
Public property Size : Integer read GetSize;

Number of items.


Generated by PasDoc 0.13.0 on 2014-07-29 16:12:40