A list of items that is unordered. This provides O(1) addition, O(1) removal, and O(1) iteration. However, having all of these nice properties requires some metadata to be stored on each item, which means that Add takes a parameter of metadata for the stored item. Same with remove.
More...
A list of items that is unordered. This provides O(1) addition, O(1) removal, and O(1) iteration. However, having all of these nice properties requires some metadata to be stored on each item, which means that Add takes a parameter of metadata for the stored item. Same with remove.
- Template Parameters
-
T | The type of item to store. |
Forge.Collections.UnorderedList< T >.UnorderedList |
( |
int |
capacity = 8 | ) |
|
Creates a new UnorderedList with the given capacity.
- Parameters
-
capacity | The capacity to give to the list |
Adds an item to the list. The location of the item in the list is unspecified.
Checks to see if the given item is contained in the UnorderedList. This is O(1).
- Parameters
-
item | The item to check |
metadata | The item's metadata |
- Returns
- True if the item is contained, false otherwise
Removes the stored item.
- Returns
- True if the item was removed, false otherwise
int Forge.Collections.UnorderedList< T >.Length |
|
getset |
The number of stored objects in Items.
T Forge.Collections.UnorderedList< T >.this[int index] |
|
getset |
Set or get the item at the specified index.
The documentation for this class was generated from the following file:
- Forge.Collections/UnorderedList.cs