Interface TLongStack

All Known Implementing Classes:
TLongArrayStack

public interface TLongStack
A stack of long primitives.
  • Method Summary

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

    • getNoEntryValue

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

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

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

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

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

      void clear()
      Clears the stack.
    • toArray

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

      void toArray(long[] 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.