Interface TShortStack

All Known Implementing Classes:
TShortArrayStack

public interface TShortStack
A stack of short primitives.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Clears the stack.
    short
    Returns the value that is used to represent null.
    short
    Returns the value at the top of the stack.
    short
    pop()
    Removes and returns the value at the top of the stack.
    void
    push(short val)
    Pushes the value onto the top of the stack.
    int
    Returns the current depth of the stack.
    short[]
    Copies the contents of the stack into a native array.
    void
    toArray(short[] dest)
    Copies a slice of the list into a native array.
  • Method Details

    • getNoEntryValue

      short getNoEntryValue()
      Returns the value that is used to represent null. The default value is generally zero, but can be changed during construction of the collection.
      Returns:
      the value that represents null
    • push

      void push(short val)
      Pushes the value onto the top of the stack.
      Parameters:
      val - an short value
    • pop

      short pop()
      Removes and returns the value at the top of the stack.
      Returns:
      an short value
    • peek

      short peek()
      Returns the value at the top of the stack.
      Returns:
      an short value
    • size

      int size()
      Returns the current depth of the stack.
    • clear

      void clear()
      Clears the stack.
    • toArray

      short[] toArray()
      Copies the contents of the stack into a native array. Note that this will NOT pop them out of the stack.
      Returns:
      an short[] value
    • toArray

      void toArray(short[] dest)
      Copies a slice of the list into a native array. Note that this will NOT pop them out of the stack.
      Parameters:
      dest - the array to copy into.