XBinder C# Runtime Library  2.8
Public Member Functions | Properties | List of all members
com.objsys.xbinder.runtime.XBStack< E > Class Template Reference

Provide a LIFO stack implementation. Internally, this is based on an ArrayList. More...

Public Member Functions

virtual void addFirst (E e)
 Add the given element to top of the stack. More...
 
virtual E peekFirst ()
 Return the element on the top of the stack, but do not remove it. If the stack is empty, return null. More...
 
virtual E removeFirst ()
 Remove and return the element from the top of the stack. More...
 
virtual int size ()
 

Properties

virtual bool Empty [get]
 Return true if the stack is empty. More...
 

Detailed Description

Provide a LIFO stack implementation. Internally, this is based on an ArrayList.

You may push null references onto the stack, but you must exercise caution when using the peekFirst method; it returns null to indicate when the stack is empty.

This could readily be replaced by java.util.Dequeue<T> once we move to Java 1.6.

<author> Kevin

</author>

Member Function Documentation

◆ addFirst()

virtual void com.objsys.xbinder.runtime.XBStack< E >.addFirst ( e)
virtual

Add the given element to top of the stack.

Parameters
e

◆ peekFirst()

virtual E com.objsys.xbinder.runtime.XBStack< E >.peekFirst ( )
virtual

Return the element on the top of the stack, but do not remove it. If the stack is empty, return null.

Returns

◆ removeFirst()

virtual E com.objsys.xbinder.runtime.XBStack< E >.removeFirst ( )
virtual

Remove and return the element from the top of the stack.

Returns

<throws> NoSuchElementException if the stack is empty. </throws>

Property Documentation

◆ Empty

virtual bool com.objsys.xbinder.runtime.XBStack< E >.Empty
get

Return true if the stack is empty.

Returns