fm.liveswitch.ManagedConcurrentStack< TValue > Class Template Reference

A ConcurrentStack that maps to the appropriate platform version. More...

Public Member Functions

void clear ()
 Clears the stack of all items. More...
 
int getCount ()
 Gets the amount of items in the stack. More...
 
boolean getIsEmpty ()
 Gets true if the stack is empty. More...
 
 ManagedConcurrentStack ()
 Creates a new instance of a ConcurrentStack. More...
 
void push (TValue item)
 Pushes a new item on top of the stack. More...
 
boolean tryPeek (fm.liveswitch.Holder< TValue > result)
 Tries to peek at the top value in stack. More...
 
boolean tryPop (fm.liveswitch.Holder< TValue > result)
 Tries to pop the top value off of the stack. More...
 

Detailed Description

A ConcurrentStack that maps to the appropriate platform version.

Constructor & Destructor Documentation

◆ ManagedConcurrentStack()

Creates a new instance of a ConcurrentStack.

Member Function Documentation

◆ clear()

void fm.liveswitch.ManagedConcurrentStack< TValue >.clear ( )

Clears the stack of all items.

◆ getCount()

int fm.liveswitch.ManagedConcurrentStack< TValue >.getCount ( )

Gets the amount of items in the stack.

◆ getIsEmpty()

boolean fm.liveswitch.ManagedConcurrentStack< TValue >.getIsEmpty ( )

Gets true if the stack is empty.

◆ push()

void fm.liveswitch.ManagedConcurrentStack< TValue >.push ( TValue  item)

Pushes a new item on top of the stack.

Parameters
itemThe item to push.

◆ tryPeek()

boolean fm.liveswitch.ManagedConcurrentStack< TValue >.tryPeek ( fm.liveswitch.Holder< TValue >  result)

Tries to peek at the top value in stack.

Parameters
resultThe value from the stack if possible, null otherwise.
Returns
True if peek succeeded, false if not.

◆ tryPop()

boolean fm.liveswitch.ManagedConcurrentStack< TValue >.tryPop ( fm.liveswitch.Holder< TValue >  result)

Tries to pop the top value off of the stack.

Parameters
resultThe value from the top of the stack if possible, null otherwise.
Returns
True if pop suceeded, false if not.