PrioritizedListT Class |
Namespace: Archon.SwissArmyLib.Collections
public class PrioritizedList<T> : IList<PrioritizedItem<T>>, ICollection<PrioritizedItem<T>>, IEnumerable<PrioritizedItem<T>>, IEnumerable
The PrioritizedListT type exposes the following members.
Name | Description | |
---|---|---|
PrioritizedListT(ListSortDirection) |
Creates a new PrioritizedList with the specified sort direction.
| |
PrioritizedListT(Int32, ListSortDirection) |
Creates a new PrioritizedList with the specified sort direction and initial capacity.
|
Name | Description | |
---|---|---|
Count |
Gets the amount of items in the list.
| |
Item |
Gets the item at the specified index.
|
Name | Description | |
---|---|---|
Add(T) |
Adds an item to the list with priority 0.
| |
Add(PrioritizedItemT) |
Adds a prioritized item to the list.
| |
Add(T, Int32) |
Adds an item to the list with the specified priority.
| |
Clear |
Clears all items from the list.
| |
Contains(T) |
Checks whether the list contains the specified item.
| |
Contains(PrioritizedItemT) |
Checks whether the list contains the specified prioritized item.
| |
CopyTo(T, Int32) |
Copies the list items to an array starting at the specified index.
| |
CopyTo(PrioritizedItemT, Int32) |
Copies the list prioritized items to an array starting at the specified index.
| |
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetEnumerator |
Gets an enumerator for the list items.
| |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetType | Gets the type of the current instance. (Inherited from Object.) | |
IndexOf(T) |
Gets the index of a item in the list.
| |
IndexOf(PrioritizedItemT) |
Gets the index of a prioritized item in the list.
| |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
Remove(T) |
Removes an item from the list.
| |
Remove(PrioritizedItemT) |
Removes a prioritized item from the list.
| |
RemoveAt |
Removes the item found at the specified index.
| |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Name | Description | |
---|---|---|
SortDirection |
Gets the sorting direction used for prioritized items in this list.
Ascending: Lower priorities are placed first.
Descending: Lower priorities are placed last.
|
Name | Description | |
---|---|---|
ShufflePrioritizedItemT |
Shuffles the list using Fisher–Yates shuffle algorithm.
(Defined by ListExtensions.) |