Skip to content

Generic Data Collections

Generic Data Collections

The library provides classes and interfaces that define generic collections, which allow users to create strongly typed collections. These collections provide greater convenience and data handling performance than non-generic typed collections.

The library is available in the Include\Generic folder of the terminal working directory.

Objects:

ObjectDescriptionType
ICollectionInterface for implementing generic data collectionsINTERFACE
IEqualityComparableInterface for implementing objects that can be comparedINTERFACE
IComparableInterface for implementing objects that can be compared in terms of “greater than, less than or equal to”INTERFACE
IComparerInterface for implementing a generic class that compares two object of the T type, whether one is “greater than, less than or equal to” the other oneINTERFACE
IEqualityComparerInterface for implementing a generic class that compares two object of the T type for equalityINTERFACE
IListInterface for implementing generic data listsINTERFACE
IMapInterface for implementing generic collections of key/value pairsINTERFACE
ISetInterface for implementing generic data setsINTERFACE
CDefaultComparerA helper class that implements the IComparer generic interface based on Compare global methodsCLASS
CDefaultEqualityComparerA helper class that implements the IEqualityComparer generic interface using Equals and GetHashCode global methodsCLASS
CArrayListA generic class that implements the IList interfaceCLASS
CKeyValuePairThe class implements the key/value pairCLASS
CHashMapA generic class that implements the IMap<TKey, TValue> interfaceCLASS
CHashSetA generic class that implements the ISet interfaceCLASS
CLinkedListNodeA helper class for implementing the CLinkedListNode classCLASS
CLinkedListA generic class that implements the ICollection interfaceCLASS
CQueueA generic class that implements the ICollection interfaceCLASS
CRedBlackTreeNodeA helper class used in implementing the CRedBlackTree classCLASS
CRedBlackTreeA generic class that implements the ICollection interfaceCLASS
CSortedMapA generic class that implements the IMap<TKey, TValue> interfaceCLASS
CSortedSetA generic class that implements the ISet interfaceCLASS
CStackA generic class that implements the ICollection interfaceCLASS

Global methods:

MethodDescription
ArrayBinarySearchSearches for the specified value in an ascending-sorted one-dimensional array using the IComparable interface to compare elements
ArrayIndexOfSearches for the first occurrence of a value in a one-dimensional array
ArrayLastIndexOfSearches for the last occurrence of a value in a one-dimensional array
ArrayReverseChanges the sequence of elements in a one-dimensional array
CompareCompares two values, whether one of them is greater than, less than or equal to the other one
EqualsCompares two values ​​for equality
GetHashCodeCalculates the hash code value
Last updated on