Idx.Observable.X.Base

trait Base[A] extends Idx.O[A] with Event.Store.Provider
Source
X.scala
trait Idx.Observable[Idx.Observable.X.Base.A]
trait Collection.Observable[Idx.Observable.X.Base.A]
trait Idx[Idx.Observable.X.Base.A]
trait Collection[Idx.Observable.X.Base.A]
trait Able.Size
trait Able.Stream[Idx.Observable.X.Base.A]
class java.lang.Object
trait scala.Matchable
class Any

Def

def apply(i: Int): A

Returns element at specified position

Returns element at specified position

 val idx: Idx[Char] = ('A' <> 'Z').stream.pack

 idx(1).tp // Prints: B

 idx(4).tp // Prints: E
Inherited from
Idx
Source
__.scala
lazy protected val eventStore: Event.Store
Inherited from
Provider
Source
Provider.scala
protected def fireChange(v: Pack[Idx.Observable.Event[A]]): Unit
Source
X.scala
final override def onAdd[U](l: A => U): Event.Control

On element add

On element add

Subscribes given function to element add event

val co: Collection.ObservableMutable[Int] = Collection.OM[Int]()

co.onAdd("Added: "+ _ tp())

co ++= 1 <> 3

// Output
Added: 1
Added: 2
Added: 3
Definition Classes
Inherited from
Observable
Source
__.scala
def onObservableChange[U](l: () => U): Event.Control
Inherited from
Observable
Source
Observable.scala
final override def onRemove[U](l: A => U): Event.Control

On element remove

On element remove

Subscribes given function to element remove event

val co: Collection.ObservableMutable[Int] = Collection.OM[Int]()

co.onRemove("Removed: "+ _ tp())

co ++= 1 <> 10

co --= 5 <> 7

// Output
Removed: 7
Removed: 6
Removed: 5
Definition Classes
Inherited from
Observable
Source
__.scala
def size: Int
Inherited from
Idx
Source
__.scala
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)
Inherited from
Idx
Source
__.scala