t

Stream._consume._convert

trait _convert[A] extends Stream.Flow._consume._convert[A]

Conversion interface

Self Type
Stream[A]
Ordering
  1. Alphabetic
Inherited
  1. Stream._consume._convert
  2. Stream.Flow._consume._convert
  3. Any.Able.ToText
  4. scala.AnyRef
  5. 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. def copyTo(b: Idx.Array.Buffer.Loader[A]): Unit

    Copy to buffer

    Copy to buffer

    This is potentially the most efficient way to get all Stream elements

    Idx.Array.Buffer.Loader provides a trustless way to copy arrays in bulk, so many array based Streams can take advantage of this

    Definition Classes
    _convert
  4. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  5. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  6. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  7. def format(separator: Opt[String] = \/, padBefore: Opt[String] = \/, padAfter: Opt[String] = \/, converter: Opt[(A) ⇒ String] = \/): String

    Elements as String

    Elements as String

    All elements are converted toString

    The results are concatenated with possible use of padding and separator

    separator

    optional string between elements

    padBefore

    optional string before each element

    padAfter

    optional string after each element

    converter

    custom element to String function

    Definition Classes
    _convert
    Example:
    1. ('a' <> 'z').all.format().lp
      ('a' <> 'z').all.format("|").lp
      ('a' <> 'z').all.format(",", "[", "]").lp
      
      // Output
      abcdefghijklmnopqrstuvwxyz
      
      a|b|c|d|e|f|g|h|i|j|k|l|m|n|o|p|q|r|s|t|u|v|w|x|y|z
      
      [a],[b],[c],[d],[e],[f],[g],[h],[i],[j],[k],[l],[m],[n],[o],[p],[q],[r],[s],[t],[u],[v],[w],[x],[y],[z]
  8. def hashCode(): Int
    Definition Classes
    AnyRef → Any
  9. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  10. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  11. final def notify(): Unit
    Definition Classes
    AnyRef
  12. final def notifyAll(): Unit
    Definition Classes
    AnyRef
  13. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  14. def to[TRGT[_]](implicit cnv: Stream.Interface.To.Converter[TRGT]): TRGT[A]

    Convert to type

    Convert to type

    Converts pipeline elements to the specified target type

    Available targets are defined in Stream.Interface.To$

    • Idx
    • Idx.M
    • Idx.OM
    • Idx.I
    • scala.List
    • scala.Seq
    • scala.IndexedSeq
    • scala.Iterator
    • scala.Vector
    • scala.collection.mutable.Buffer
    • java.util.Collection
    • java.util.List
    • java.util.Iterator
    • java.util.Spliterator
    • java.util.stream.Stream
    ("1" ~+ "2" + "3").to[Idx.I]  // Returns: Idx.I[String]
    
    ('A' <> 'D').all.to[List]        // Returns: scala.List[Char]
    
    (1 <> 5).all.to[java.util.List]  // Returns: java.util.List[Int]

    New target conversions can be implemented by creating implicit object extending Stream.Interface.To$.Converter

    Definition Classes
    _convert
  15. def toArray(implicit ct: ClassTag[A]): Array[A]

    Convert to Array

    Convert to Array

    Concert stream to array

    val a : Array[Int] =  (1<>10).all.toArray
    Definition Classes
    _convert
  16. def toBuffer: Stream[A]

    New buffered stream

    New buffered stream

    Buffers all elements from the source and returns them as new Stream

    Definition Classes
    _convert
  17. def toLookup[KEY](key: (A) ⇒ KEY): Lookup[KEY, A]

    New Lookup

    New Lookup

    Creates a Lookup collection out of Stream elements

    Definition Classes
    _convert
  18. def toLookup[KEY, VAL](implicit ev: <:<[A, (KEY, VAL)]): Lookup[KEY, VAL]

    New Lookup

    New Lookup

    This Stream must contain tuples of keys and values

    Definition Classes
    _convert
  19. def toRaw[TRGT](implicit c: Stream.Interface.To.Primitive.Converter[A, TRGT]): TRGT

    Convert to immutable collection

    Convert to immutable collection

    Converts pipeline to the specified immutable collection

    The types of collection and Stream must match

    Available targets are:

    (1 <> 10).all.toRaw[Ints]
    
    ('A' <> 'D').all.toRaw[Chars]
    Definition Classes
    _convert
  20. def toString(): String

    Elements as String

    Elements as String

    Returns String starting with "~(" and containing all elements separated by ", "

    (1 <> 5).all.toString.lp
    
    // Output
    ~(1, 2, 3, 4, 5)
    Definition Classes
    _convert → AnyRef → Any
  21. def toString(name: String): String

    Elements as String

    Elements as String

    Returns String starting with given name and containing all elements separated by ", "

    (1 <> 5).all.toString("My Ints").lp
    
    // Output
    My Ints(1, 2, 3, 4, 5)
    Definition Classes
    _convert
  22. def toText: String

    Elements as multi-line String

    Elements as multi-line String

    Returns all elements as String formatted table

    If elements implement Any.Able.ToInfo, each 'info' property value is placed in a different column

    If elements implement scala.Product (like all Tuples), each Product element is placed in a different column

    ('a' <> 'e').all.map(c => (c + "1", c + "2", c + "3", c + "4", c + "5")) tp
    
    // Output
    -- -- -- -- --
    ?  ?  ?  ?  ?
    -- -- -- -- --
    a1 a2 a3 a4 a5
    b1 b2 b3 b4 b5
    c1 c2 c3 c4 c5
    d1 d2 d3 d4 d5
    e1 e2 e3 e4 e5
    -- -- -- -- --
    Definition Classes
    _convertToText
  23. def toVals(implicit c: Any.Datum.Setup[A]): Vals[A]

    Convert to Vals

    Convert to Vals

    Stores all elements as Vals immutable collection

    Only works if Stream holds Any.Datum type

    Definition Classes
    _convert
  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
    @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