Schnittstelle FloatStack

Alle bekannten Implementierungsklassen:
CopyOnWriteFloatArrayList, FloatArrayList, FloatLinkedList

public interface FloatStack
A Type-Specific Stack that reduces (un)boxing
  • Methodenübersicht

    Modifizierer und Typ
    Methode
    Beschreibung
    void
    Clears the stack
    default boolean
     
    float
    peek(int index)
    Provides the Selected Object from the stack.
    float
    pop()
    Removes the Object on top of the stack.
    void
    push(float e)
    Inserts a given Object on top of the stack
    default void
    Helper function that pushes the top element on top of the stack again.
    int
    Provides the amount of elements currently in the stack
    default float[]
    A method to drop the contents of the Stack without clearing the stack
    float[]
    toFloatArray(float[] input)
    A method to drop the contents of the Stack without clearing the stack
    default float
    top()
    Provides the Object on top of the stack
  • Methodendetails

    • push

      void push(float e)
      Inserts a given Object on top of the stack
      Parameter:
      e - the Object to insert
      Siehe auch:
    • pushTop

      default void pushTop()
      Helper function that pushes the top element on top of the stack again.
      Löst aus:
      NoSuchElementException - if the stack is empty
    • pop

      float pop()
      Removes the Object on top of the stack.
      Gibt zurück:
      the element that is on top of the stack
      Löst aus:
      ArrayIndexOutOfBoundsException - if the stack is empty
      Siehe auch:
    • top

      default float top()
      Provides the Object on top of the stack
      Gibt zurück:
      the element that is on top of the stack
      Löst aus:
      ArrayIndexOutOfBoundsException - if the stack is empty
      Siehe auch:
    • peek

      float peek(int index)
      Provides the Selected Object from the stack. Top to bottom
      Parameter:
      index - of the element that should be provided
      Gibt zurück:
      the element that was requested
      Löst aus:
      ArrayIndexOutOfBoundsException - if the index is out of bounds
      Siehe auch:
    • clear

      void clear()
      Clears the stack
    • size

      int size()
      Provides the amount of elements currently in the stack
      Gibt zurück:
      amount of elements in the list
    • isEmpty

      default boolean isEmpty()
      Gibt zurück:
      if the stack is empty
    • toFloatArray

      default float[] toFloatArray()
      A method to drop the contents of the Stack without clearing the stack
      Gibt zurück:
      the contents of the stack into a seperate array.
    • toFloatArray

      float[] toFloatArray(float[] input)
      A method to drop the contents of the Stack without clearing the stack
      Parameter:
      input - where the elements should be inserted to. If it does not fit then it creates a new appropiatly created array
      Gibt zurück:
      the contents of the stack into a seperate array.
      Note:
      if the Type is generic then a Object Array is created instead of a Type Array