Interface IStack<T>
Implements a First-In-Last-Out stack data structure.
Inherited Members
Namespace: Towel.DataStructures
Assembly: Towel.dll
Syntax
public interface IStack<T> : IDataStructure<T>, ISteppable<T>, System.Collections.Generic.IEnumerable<T>, DataStructure.ICountable, DataStructure.IClearable
Type Parameters
Name | Description |
---|---|
T | The generic type within the structure. |
Methods
| Improve this Doc View SourcePeek()
Returns the most recent addition to the stack.
Declaration
T Peek()
Returns
Type | Description |
---|---|
T | The most recent addition to the stack. |
Pop()
Removes and returns the most recent addition to the stack.
Declaration
T Pop()
Returns
Type | Description |
---|---|
T | The most recent addition to the stack. |
Push(T)
Adds an item to the top of the stack.
Declaration
void Push(T push)
Parameters
Type | Name | Description |
---|---|---|
T | push | The item to add to the stack. |