Click or drag to resize
ListBucketT Class
Simple class which can be used as a bucket in a linked list. The .NET LinkedList class has a downside that you can't concatenate two linked lists in O(1) time: a LinkedListNode is part of a LinkedList object and to connect two lists, one has to traverse one of them in full.
Inheritance Hierarchy
SystemObject
  SD.Tools.Algorithmia.GeneralDataStructuresListBucketT

Namespace:  SD.Tools.Algorithmia.GeneralDataStructures
Assembly:  SD.Tools.Algorithmia (in SD.Tools.Algorithmia.dll) Version: 1.2.0.0 (1.2.16.0406)
Syntax
public class ListBucket<T>

Type Parameters

T
Type of the element contained in this bucket

The ListBucketT type exposes the following members.

Constructors
  NameDescription
Public methodListBucketT
Initializes a new instance of the ListBucketT class.
Top
Properties
  NameDescription
Public propertyContents
Gets or sets the contents of this bucket
Public propertyNext
Gets or sets the next bucket in the list
Public propertyPrevious
Gets or sets the previous bucket in the list.
Top
Methods
  NameDescription
Public methodAppendAfter(T)
Appends the passed in contents in a new bucket after this bucket in the list.
Public methodAppendAfter(ListBucketT)
Appends the passed in bucket after this bucket in the list.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodInsertBefore(T)
Inserts the passed in contents in a new bucket before this bucket in the list
Public methodInsertBefore(ListBucketT)
Inserts the passed in bucket before this bucket in the list
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodRemoveFromList
Removes this bucket from the list, connecting both ends together.
Public methodToString
Returns a String that represents the current Object.
(Overrides ObjectToString.)
Top
See Also