~._use._transformTo

class Object
trait Matchable
class Any
trait _use
object ~

Def

@targetName("pack")
def ><[A]: ><[A]

Pack

Pack

Returns stream elements as Pack

Source
_transformTo.scala
def iterator[A]: Iterator[A]

Iterator view

Iterator view

Wraps current stream as scala.collection.Iterator

Source
_transformTo.scala
def makeString[A](sep: String)(using t: Info.Tag.Doc[A]): String

Convert ot String

Convert ot String

The result is a concatenation of all elements with given separator

   ('a' <> 'j').~.makeString()              // Returns abcdefghij

   ('a' <> 'j').~.makeString("|")           // Returns a|b|c|d|e|f|g|h|i|j

Source
_transformTo.scala
def toArray[A](using ClassTag[A]): Array[A]

Convert to Array

Convert to Array

Returns stream elements as Array

 val a : Array[Int] =  (1 <> 10).~.toArray
Source
_transformTo.scala
def toBuffer[A]: Buffer[A]

Convert to Buffer

Convert to Buffer

Returns stream elements as Buffer

Source
_transformTo.scala
def toIdx[A]: Idx[A]

Convert to Idx

Convert to Idx

Returns stream elements as Idx

Source
_transformTo.scala
inline def toJavaIterator[A]: Iterator[A]

Convert to Java Iterator

Convert to Java Iterator

Wraps current stream as java.util.Iterator

Source
_transformTo.scala
def toJavaList[A]: List[A]

Convert to Java List

Convert to Java List

Returns stream elements as java.util.List

Source
_transformTo.scala
inline def toJavaSpliterator[A](inline splitSize: Int): Spliterator[A]

Convert to Java Spliterator

Convert to Java Spliterator

Wraps current stream as java.util.Spliterator

Source
_transformTo.scala
def toJavaStream[A](parallel: Boolean): Stream[A]

Convert to Java Stream

Convert to Java Stream

Wraps current stream as java.util.stream.Stream

Source
_transformTo.scala
def toList[A]: List[A]

Convert to List

Convert to List

Returns stream elements as scala.collection.immutable.List

Source
_transformTo.scala
def toLookup[A, B]: Lookup[A, B]

Convert to Lookup

Convert to Lookup

Returns a stream of tuples with (Key,Value) pairs as Lookup

val intLookup : Lookup[Int,Char] = ('A' <> 'F').~.zipKey(_.Int).toLookup

intLookup.pair_~.tp   // Prints ~((69,E), (70,F), (65,A), (66,B), (67,C), (68,D))

val charLookup : Lookup[Char,Int] = ('A' <> 'F').~.zipValue(_.Int).toLookup

charLookup.pair_~.tp   // Prints ~((E,69), (F,70), (A,65), (B,66), (C,67), (D,68))
Source
_transformTo.scala
def toLookupBy[A](f: A => K): Lookup[K, A]
def toMap[A, B]: Map[A, B]
def toMapBy[A](f: A => K): Map[K, A]
def toProduct[A]: Product

Convert to Product

Convert to Product

Returns stream elements as scala.Product

Source
_transformTo.scala
def toSeq[A]: IndexedSeq[A]

Convert to Seq

Convert to Seq

Returns stream elements as scala.collection.immutable.IndexedSeq

Source
_transformTo.scala
def toSet[A]: StableSet[A]

Convert to unique collection

Convert to unique collection

Returns stream elements as StableSet

Source
_transformTo.scala
def toText[A](using t: Info.Tag.Doc[A]): String

Elements as multi-line String

Elements as multi-line String

Returns all elements as String formatted table

If elements implement Able.Info, 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').~.map(v => (v + "1", v + "2", v + "3", v + "4", v + "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
  -- -- -- -- --
Source
_transformTo.scala
def toVector[A]: Vector[A]

Convert to Vector

Convert to Vector

Returns stream elements as scala.collection.immutable.Vector

Source
_transformTo.scala