_transformTo

class java.lang.Object
trait scala.Matchable
class Any
trait _use
object ~

Def

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

Pack elements

Pack elements

Returns stream elements as ><

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

Iterator view

Iterator view

Wraps current stream as scala.collection.Iterator

Source
_transformTo.scala
def makeString[A](sep: String)(using t: Given.DocTag[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 scala.reflect.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]: java.util.Iterator[A]

Convert to Java Iterator

Convert to Java Iterator

Wraps current stream as java.util.Iterator

Source
_transformTo.scala
def toJavaList[A]: java.util.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): java.util.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): java.util.stream.Stream[A]

Convert to Java Stream

Convert to Java Stream

Wraps current stream as java.util.stream.Stream

Source
_transformTo.scala
def toList[A]: scala.collection.immutable.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]: scala.collection.immutable.Map[A, B]
def toMapBy[A](f: A => K): scala.collection.immutable.Map[K, A]
def toProduct[A]: scala.Product

Convert to Product

Convert to Product

Returns stream elements as scala.Product

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

Convert to Seq

Convert to Seq

Returns stream elements as scala.collection.immutable.IndexedSeq

Source
_transformTo.scala

Convert to unique collection

Convert to unique collection

Returns stream elements as StableSet

Source
_transformTo.scala
def toText[A](using t: Given.DocTag[A]): String

Elements as multi-line String

Elements as multi-line String

Returns all elements as String formatted table

If elements implement Able.Doc, each 'doc' 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]: scala.collection.immutable.Vector[A]

Convert to Vector

Convert to Vector

Returns stream elements as scala.collection.immutable.Vector

Source
_transformTo.scala