Able.Add

trait Add[A]

Generic Add

Adding elements to some target container

Source
Add.scala
class java.lang.Object
trait scala.Matchable
class Any
trait Collection.Mutable[Collection.Mutable.A]
trait Collection.ObservableMutable[Collection.ObservableMutable.A]

Def

inline def ++=(v: Stream[A]): Able.Add[A]

Alias for addAll

Alias for addAll

Calls addAll and returns container

 // Generic example
 val x =  Idx.M(1, 2, 3)

 x ++= (4 <> 6) ++= Stream(7, 8, 9)

 x.stream.tp // Stream(1, 2, 3, 4, 5, 6, 7, 8, 9)
Source
Add.scala
inline def ++=(v: Opt[A]): Able.Add[A]

Alias for addAll

Alias for addAll

Generally Opt could be added as a stream.

This overload is sligtly more efficient, but it is also required for mapped Opt expressions, where Opt type is harder to resolve and it would not compile.

Source
Add.scala
inline def +=(v: A): Able.Add[A]

Alias for add

Alias for add

Calls add and returns container

 // Generic example
 val x =  Idx.M(1, 2, 3)

  x += 4 += 5 += 6

  x.stream.tp // Prints Stream(1, 2, 3, 4, 5, 6)
Source
Add.scala
def add(v: A): Unit

Add

Add

Adds given value to target container

 // Generic example
 val x =  Idx.M(1, 2, 3)

  x.add(4)
  x.add(5)
  x.add(6)

  x.stream.tp // Prints Stream(1, 2, 3, 4, 5, 6)
Source
Add.scala
def addAll(v: Stream[A]): Unit

Add many

Add many

Adds given stream of elements to target container

 // Generic example
 val x =  Idx.M(1, 2, 3)

  x.addAll(4 <> 6)
  x.addAll( Stream(7,8,9))

  x.stream.tp // Stream(1, 2, 3, 4, 5, 6, 7, 8, 9)
Source
Add.scala