Joutsen v0.5.0+12-g5dd5f7e
Public Member Functions | Properties | List of all members
Joutsen.Collections.Generic.Stack< ItemType > Interface Template Reference

An interface describing last-in first-out data structures. More...

Public Member Functions

void Push (ItemType item)
 Adds an item to the stack. More...
 
void Push (SCG.IEnumerable< ItemType > items)
 Adds a number of items to the stack. More...
 
ItemType Pop ()
 Fetches and removes the last item added to the stack. More...
 
ItemType Peek ()
 Fetches the last item added to the stack without removing it. More...
 
void Clear ()
 Removes all the items from the Stack. More...
 

Properties

int Count [get]
 The number of elements in the queue. More...
 

Detailed Description

An interface describing last-in first-out data structures.

Since
0.4.0

Member Function Documentation

◆ Clear()

void Joutsen.Collections.Generic.Stack< ItemType >.Clear ( )

Removes all the items from the Stack.

◆ Peek()

ItemType Joutsen.Collections.Generic.Stack< ItemType >.Peek ( )

Fetches the last item added to the stack without removing it.

Returns
the last item in the queue

◆ Pop()

ItemType Joutsen.Collections.Generic.Stack< ItemType >.Pop ( )

Fetches and removes the last item added to the stack.

◆ Push() [1/2]

void Joutsen.Collections.Generic.Stack< ItemType >.Push ( ItemType  item)

Adds an item to the stack.

◆ Push() [2/2]

void Joutsen.Collections.Generic.Stack< ItemType >.Push ( SCG.IEnumerable< ItemType >  items)

Adds a number of items to the stack.

Parameters
itemsthe items to add to the queue

Property Documentation

◆ Count

int Joutsen.Collections.Generic.Stack< ItemType >.Count
get

The number of elements in the queue.