abstract class _Class[+A] extends AnyRef

Stream.Interface has global alias "~" (tilde), which is used in most situations

val v : ~[Int] = \/    // Creates value of type Stream.Interface[Int] with void stream assigned

On use, Stream.Interface will always be converted to Stream, so there is nothing wrong calling it Stream

There are two reasons why Stream.Interface and Stream are separate entities:

  • Stream.Interface is co-variant, what is important for many collections. Stream is invariant, what is beneficial for data processing
  • Stream.Interface has no methods, so any type like List, Array, Iterator, etc. can be implicitly convertible to it, without the overhead of inherited methods

Stream.Interface (like TraversableOnce in Scala) is the universal data exchange format, because all collections are "stream-able". Consider example:

import scalqa.Stream.Enable._

val list:     List[Int]           = 1 :: 2 :: 3 :: Nil
val array:    Array[Int]          = (4 to 6).all.toArray
val iterator: Iterator[Int]       = (7 to 9).all.to[Iterator]
val javaList: java.util.List[Int] = (10 to 12).all.to[java.util.List]

var ints: Ints = \/

ints.all lp // Prints:  ~()

ints = ints +~ list +~ array +~ iterator +~ javaList

ints.all lp // Prints:  ~(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12)
Ordering
  1. Alphabetic
Inherited
  1. Interface
  2. scala.AnyRef
  3. scala.Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Method

  1. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  2. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  3. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  4. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  5. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  6. def hashCode(): Int
    Definition Classes
    AnyRef → Any
  7. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  8. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. final def notify(): Unit
    Definition Classes
    AnyRef
  10. final def notifyAll(): Unit
    Definition Classes
    AnyRef
  11. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  12. def toString(): String
    Definition Classes
    AnyRef → Any
  13. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  14. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  15. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Operator

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any