Interface IList<T>
A primitive dynamic sized data structure.
Inherited Members
Namespace: Towel.DataStructures
Assembly: Towel.dll
Syntax
public interface IList<T> : IDataStructure<T>, ISteppable<T>, System.Collections.Generic.IEnumerable<T>, DataStructure.IAddable<T>, DataStructure.ICountable, DataStructure.IClearable
Type Parameters
| Name | Description |
|---|---|
| T | The type of items to store in the list. |
Methods
| Improve this Doc View SourceRemoveAll<TPredicate>(TPredicate)
Removes all occurences of predicated values from the list.
Declaration
void RemoveAll<TPredicate>(TPredicate predicate = default(TPredicate))
where TPredicate : struct, IFunc<T, bool>
Parameters
| Type | Name | Description |
|---|---|---|
| TPredicate | predicate | The predicate to determine removals. |
Type Parameters
| Name | Description |
|---|---|
| TPredicate | The type of predicate to determine removals. |
TryRemoveFirst<TPredicate>(out Nullable<Exception>, TPredicate)
Tries to remove the first predicated value if the value exists.
Declaration
bool TryRemoveFirst<TPredicate>(out Exception? exception, TPredicate predicate = default(TPredicate))
where TPredicate : struct, IFunc<T, bool>
Parameters
| Type | Name | Description |
|---|---|---|
| System.Nullable<Exception> | exception | The exception that occurred if the remove failed. |
| TPredicate | predicate | The predicate to determine removal. |
Returns
| Type | Description |
|---|---|
| System.Boolean | True if the value was removed. False if the value did not exist. |
Type Parameters
| Name | Description |
|---|---|
| TPredicate | The type of predicate to determine removal. |