sealed abstract class Catenable[+A] extends AnyRef
Trivial catenable sequence. Supports O(1) append, and (amortized)
O(1) uncons
, such that walking the sequence via N successive uncons
steps takes O(N). Like a difference list, conversion to a Seq[A]
takes linear time, regardless of how the sequence is built up.
- Source
- Catenable.scala
- Alphabetic
- By Inheritance
- Catenable
- AnyRef
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- All
Abstract Value Members
-
abstract
def
isEmpty: Boolean
Returns true if there are no elements in this collection.
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
- def +(other: String): String
-
final
def
++[A2 >: A](c: Catenable[A2]): Catenable[A2]
Concatenates this with
c
in O(1) runtime. -
final
def
+:[A2 >: A](a: A2): Catenable[A2]
Alias for cons.
- def ->[B](y: B): (Catenable[A], B)
-
final
def
:+[A2 >: A](a: A2): Catenable[A2]
Alias for snoc.
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
cons[A2 >: A](a: A2): Catenable[A2]
Returns a new catenable consisting of
a
followed by this.Returns a new catenable consisting of
a
followed by this. O(1) runtime. - def ensuring(cond: (Catenable[A]) ⇒ Boolean, msg: ⇒ Any): Catenable[A]
- def ensuring(cond: (Catenable[A]) ⇒ Boolean): Catenable[A]
- def ensuring(cond: Boolean, msg: ⇒ Any): Catenable[A]
- def ensuring(cond: Boolean): Catenable[A]
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
foldLeft[B](z: B)(f: (B, A) ⇒ B): B
Folds over the elements from left to right using the supplied initial value and function.
-
final
def
foreach(f: (A) ⇒ Unit): Unit
Applies the supplied function to each element, left to right.
- def formatted(fmtstr: String): String
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
map[B](f: (A) ⇒ B): Catenable[B]
Applies the supplied function to each element and returns a new catenable.
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
nonEmpty: Boolean
Returns false if there are no elements in this collection.
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
final
def
snoc[A2 >: A](a: A2): Catenable[A2]
Returns a new catenable consisting of this followed by
a
.Returns a new catenable consisting of this followed by
a
. O(1) runtime. -
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
final
def
toList: List[A]
Converts to a list.
-
def
toString(): String
- Definition Classes
- Catenable → AnyRef → Any
-
final
def
toVector: Vector[A]
Converts to a vector.
-
final
def
uncons: Option[(A, Catenable[A])]
Returns the head and tail of this catenable if non empty, none otherwise.
Returns the head and tail of this catenable if non empty, none otherwise. Amortized O(1).
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
- def →[B](y: B): (Catenable[A], B)