c

Stream.Interface

abstract class _Class[+A] extends AnyRef

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

val s : ~[Int] = \/  // val 's' of type Stream.Interface[Int]

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 is the Scalqa's single universal data exchange format. There is an implicit conversions to Stream.Interface for every container like structure, included the ones in Java and Scala. Therefore all data structures are universally compatible

val javaList:      java.util.List[Int]          = (1 <> 3).all.to[java.util.List]
val javaStream:    java.util.stream.Stream[Int] = (4 <> 6).all.to[java.util.stream.Stream]
val scalaIterator: scala.Iterator[Int]          = (7 <> 9).all.to[Iterator]
val scalaList:     scala.List[Int]              = 10 :: 11 :: 12 :: Nil

var ints: Ints = \/

ints = ints +~ javaList +~ javaStream +~ scalaIterator +~ scalaList

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
Linear Supertypes
AnyRef, Any
Source: _Class.scala