Doc

class Doc extends AnyRef.G.Buffer[(String, String)] with _core with scala.Product

General Instance Documentation

Doc is a buffer of (name,value) pairs, describing all instance properties

Source
__.scala
trait scala.Product
trait scala.Equals
trait _core
trait Able.Tag
class AnyRef.G.Buffer[(String, String)]
class Buffer[(String, String)]
trait Idx.Mutable[(String, String)]
trait Able.Contain[(String, String)]
trait Collection.Mutable[(String, String)]
trait Able.Add[(String, String)]
trait Idx[(String, String)]
trait Collection[(String, String)]
trait Able.Size
trait Able.Stream[(String, String)]
class java.lang.Object
trait scala.Matchable
class Any

Def

inline def ++=(v: Opt[(String, String)]): Doc

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.

Inherited from
Add
Source
Add.scala
inline def ++=(v: Stream[(String, String)]): Doc

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)
Inherited from
Add
Source
Add.scala
inline def ++@=(position: Int, v: Stream[(String, String)]): Doc

Alias for addAllAt

Alias for addAllAt

Adds stream elements at given position

  // Generic example
  val x = ('A' <> 'F').stream.toBuffer

  x ++@= (4, 'e' <> 'g') ++@= (1, Stream('b','c','d'))

  x.stream.tp // Prints Stream(A, b, c, d, B, C, D, e, f, g, E, F)
Inherited from
Mutable
Source
__.scala
inline def +=[A](name: String, value: A)(using t: Any.Def.Tag[A]): Doc
Source
__.scala
inline def +=(value: String): Doc
Source
__.scala
inline def +=(v: (String, String)): Doc

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)
Inherited from
Add
Source
Add.scala
inline def +@=[A](p: Int, n: String, v: A)(using t: Any.Def.Tag[A]): Doc
Source
__.scala
inline def +@=(position: Int, v: (String, String)): Doc

Alias for addAt

Alias for addAt

Adds element at given position

  // Generic example
  val x = ('A' <> 'F').stream.toBuffer

  x +@= (3, 'd') +@= (2, 'c') +@= (1, 'b') +@= (0, 'a')

  x.stream.tp // Prints Stream(a, A, b, B, c, C, d, D, E, F)
Inherited from
Mutable
Source
__.scala
def --=(v: Stream[(String, String)]): Doc

Alias for removeAll

Alias for removeAll

Removes all collection elements, which are equal to those in given stream

Returns the collection itself

Inherited from
Mutable
Source
Mutable.scala
def -=(v: (String, String)): Doc

Alias for remove

Alias for remove

Removes all collection elements, which are equal to the given value

Returns the collection itself

Inherited from
Mutable
Source
Mutable.scala
def add[A](name: String, value: A)(using d: Any.Def.Tag[A]): Unit
Source
__.scala
def add[A](value: A)(using d: Any.Def.Tag[A]): Unit
Source
__.scala
override def add(v: (String, String)): Unit
Definition Classes
Inherited from
Buffer
Source
Buffer.scala
override def addAll(v: Stream[(String, String)]): Unit

Append Stream

Append Stream

Adds all elements to Buffer end

Definition Classes
Inherited from
Buffer
Source
__.scala
override def addAllAt(i: Int, v: Stream[(String, String)]): Unit

Insert Stream

Insert Stream

Inserts all elements at specified buffer position

Definition Classes
Inherited from
Buffer
Source
__.scala
final def addArray_trusted(a: Array[(String, String)], start: Int, len: Int): Unit

Add array elements

Add array elements

Programms are expected to pass even private sensitive arrays, because this method is final and can be exemined not to abuse the trust

The given arguments specify range of elements to be added.

Whenever possible the adding will be done with bulk copy from given array to buffer array

Inherited from
Buffer
Source
__.scala
def addAt[A](pos: Int, name: String, value: A)(using d: Any.Def.Tag[A]): Unit
Source
__.scala
def addAt(i: Int, v: (String, String)): Unit
Inherited from
Buffer
Source
Buffer.scala
def apply(i: Int): (String, String)
Inherited from
Buffer
Source
Buffer.scala
def canEqual(that: Any): Boolean
Source
__.scala
override def clear: Unit

Empty buffer

Empty buffer

Note. Even buffer becomes zero sized, the storage array will not shrink and will still reference the old elements (untill overwritten with new).

Definition Classes
Inherited from
Buffer
Source
__.scala
def contains(v: (String, String)): Boolean
Inherited from
Buffer
Source
Buffer.scala
inline def foreach[U](f: (String, String) => U): Unit

Process all elements

Process all elements

Applies given function to each Buffer element.

This method is more eficient than Stream foreach.

Inherited from
Buffer
Source
__.scala
var id: String
Source
__.scala
def nameStream: Stream[String]
Source
__.scala
def pack: Pack[(String, String)]
Inherited from
Buffer
Source
Buffer.scala
def pairStream(sep: String): Stream[String]
Source
__.scala
def remove(v: (String, String)): Int

Remove element

Remove element

Removes all Idx elements, which are equal to the given value

Returns count of removed elements, which can be 0, 1, or many

Inherited from
Mutable
Source
__.scala
def removeAll(v: Stream[(String, String)]): Int

Remove all streamed

Remove all streamed

Removes all collection elements, which are equal to those in given stream

Returns count of removed elements, which can be 0, 1, or many

Inherited from
Mutable
Source
Mutable.scala
def removeAt(position: Int): Unit

Remove at position

Remove at position

Removes element at given position

 // Generic example
 val x = ('A' <> 'D').stream.toBuffer

 x.remove(2)
 x.remove(1)

 x.stream.tp // Prints Stream(A, D)
Inherited from
Mutable
Source
__.scala
def removeRange(v: Int.Range): Unit

Remove range

Remove range

Removes elements at given range

 val x = (0 <> 10).stream.toBuffer

 x.remove(7 <> 8)
 x.remove(2 <> 4)

 x.stream.tp // Prints Stream(0, 1, 5, 6, 9, 10)
Inherited from
Buffer
Source
__.scala
def replaceWith(v: Stream[(String, String)]): Unit

Replace everything

Replace everything

Discards all old elements and adds all provided elements

Inherited from
Mutable
Source
Mutable.scala

Reorganizes elements

Reorganizes elements

Reorganizes elements according to the given permutation

  val im: Idx.Mutable[Int] = (0 <> 9).stream.toBuffer

  val p = Idx.Permutation.pairs(3 -> 7, 7 -> 3, 4 -> 6, 6 -> 4)

  im.stream.tp
  im.reposition(p)
  im.stream.tp

  // Output
  Stream(0, 1, 2, 3, 4, 5, 6, 7, 8, 9)
  Stream(0, 1, 2, 7, 6, 5, 4, 3, 8, 9)
Inherited from
Mutable
Source
__.scala
def size: Int
Inherited from
Buffer
Source
Buffer.scala
override def sort(using c: Ordering[(String, String)]): Unit
Definition Classes
Inherited from
Buffer
Source
Buffer.scala
override def stream: Stream[(String, String)]
Definition Classes
Inherited from
Buffer
Source
Buffer.scala
def tag: String
Source
__.scala
def text: String
Source
__.scala
def update[A](name: String, v: A)(using d: Any.Def.Tag[A]): Unit
Source
__.scala
def update[A](pos: Int, v: A)(using d: Any.Def.Tag[A]): Unit
Source
__.scala
def updateAllAt(position: Int, s: Stream[(String, String)]): Unit

Update many at position

Update many at position

Replaces elements starting at given position with stream values

Inherited from
Mutable
Source
__.scala
def updateAt(i: Int, v: (String, String)): Unit
Inherited from
Buffer
Source
Buffer.scala
def valueStream: Stream[String]
Source
__.scala