Idx.Selection

trait Selection[A] extends Idx[A] with Able.Doc

Lists selected values for some target indexed collection

Source
__.scala
trait Able.Doc
trait Able.Tag
trait Idx[Idx.Selection.A]
trait Collection[Idx.Selection.A]
trait Able.Size
trait Able.Stream[Idx.Selection.A]
class java.lang.Object
trait scala.Matchable
class Any
trait Idx.Selection.Observable[Idx.Selection.Observable.A]

Def

def apply(i: Int): A

Get value

Get value

Get selected value at given index

Source
__.scala
def doc: Doc
Source
__.scala
def indexes: Idx[Int]

Selected positions

Selected positions

Selected positions from target index

Note. positions.size == size

Source
__.scala
def property(dflt: A): Pro[A]

Selected property

Selected property

Returns property instance wich will be updated real-time with the first selected value. Because the Selection can be empty, this property needs a default value to provide in this case.

Source
__.scala
def size: Int

Count of selected values

Count of selected values

Returns total number of selected values

Source
__.scala
override def stream: Stream[A]

Returns a Stream of all elements

Returns a Stream of all elements

The element order is same as in the Idx itself

  val l: Idx[Char] = ('a' <> 'g').stream.pack

  l.stream.tp  // Prints Stream(a, b, c, d, e, f, g)
Definition Classes
Source
__.scala
def tag: String

Make String

Make String

tag returns this instance String representation, which should be used insted of toString

Inherited from
Doc
Source
Doc.scala
def target: Idx[A]

Selection target

Selection target

The Idx targeted by this selection

Source
__.scala
inline def value: A
Source
__.scala
def valueOpt: Opt[A]

Optional selected value

Optional selected value

Returns first selected value or void option, if selection is empty

Source
__.scala