Closed LaKraven closed 6 years ago
Note: It may be worth using TLKArray
as the absolute base, as this provides the fundamental functionality.... worth thinking about!
Ideally, I'd like TLKListBase
to be the absolute base class for TLKList
, TLKObjectList
, TLKLookupList
, TLKObjectLookupList
, TLKDictionary
, TLKObjectDictionary
,TLKCenteredList
, TLKCenteredObjectList
I want to be able to remove TLKSortedList
and TLKSortedObjectList
as TLKListBase
will define a property to specify a TLKListSorter
Type.
It would be particularly useful if I can make TLKTree
inherit from TLKListBase
as well, since it behaves as both a Node and a List.
Related: #108 Related: #109 Related: #110
Changes to the plan:
TLKArray<T>
as the actual Array container, and to pass this reference (as ILKArray<T>
) to the Sorter, Expander and Compactor objects.TLKList<T>
and drop what I'm hoping will be an irrelevant abstraction layer.
Notes
TLKListCapacityExpander
andTLKListCapacityCompactor
respectively.TLKListSorter
abstract construct, descendants of which dictate such things as sort ordering and sorting algorithm.IComparer
and all other Delphi-Specific types need to be dropped, with the intent of implementing custom (universal) versions as part of the LKSL (such asTLKComparer
).Contains
andIndexOf
methods should pass the request through to the chosenTLKListSorter
object, as this may provide a superior means of looking up the item(s).