Packages

sealed trait Stack[+A] extends AnyRef

Stack with top on the right. For example the stack Bottom :+ a3 :+ a2 +: a1 has element a1 on the top, then a2 as the top of the tail.

Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Stack
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def drop(n: Int): Stack[A]

    Select all elements except the top n elements of this stack, or empty if there are not that many.

  2. abstract def isEmpty: Boolean

    Whether this stack is empty

  3. abstract def tail: Stack[A]

    Tail of this stack, i.e.

    Tail of this stack, i.e. all but top element, or error if empty.

  4. abstract def take(n: Int): Stack[A]

    Select only the top n elements of this stack, or less if there are not that many.

  5. abstract def top: A

    Top element of this stack or error if empty.

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. def ++[B >: A](pushStack: Stack[B]): Stack[B]

    S++T result of pushing the whole stack T as is on top of the stack S.

  4. def :+[B >: A](push: B): Stack[B]

    S:+b result of pushing b on top of the stack S.

  5. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. def find(p: (A) ⇒ Boolean): Option[A]

    Find the top-most element satisfying p, if any

  12. def fold[B](z: B)(f: (B, A) ⇒ B): B

    Fold the elements of this stack by f starting with z at the Bottom.

  13. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  14. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  15. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  16. def length: Int

    Number of elements on this stack

  17. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  18. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  19. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  20. def split[B >: A](p: (B) ⇒ Boolean): (Stack[B], Stack[B])

    Splits the stack at first occurrence of an element next s.t.

    Splits the stack at first occurrence of an element next s.t. p(next) = true; p is placed in the later stack.

    Example:
    1. (A B C D E).split(C) = ( (A,B), (C, D, E) )

  21. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  22. def toList: List[A]

    Convert stack A,B,C where top = A to the list A :: B :: C :: Nil

  23. def toString(): String
    Definition Classes
    Stack → AnyRef → Any
  24. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  26. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped