J.Util.Proxy.Collection.O

abstract class O[A] extends J.Util.Proxy.Collection[A] with J.Util.Proxy.Collection.O.Basis[A]
trait Collection[A]
trait Able.Size
trait Able.~[A]
class java.lang.Object
trait scala.Matchable
class Any

Def

@scala.annotation.targetName("stream")
override def ~: ~[A]

Stream elements

Stream elements

Returns a stream of all collection elements

Unless specifically defined, the order must be assumed as random

  val c = Collection(1,3,5,7)
  c.~.tp

  // Output
  ~(1, 3, 5, 7)
Definition Classes
Inherited from
Basis
Source
Collection.scala
override def isEmpty: Boolean

Empty check

Empty check

Returns true if instance is empty.

Definition Classes
Inherited from
Size
Source
Size.scala
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
Basis
Source
Collection.scala
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
Basis
Source
Collection.scala
override def size: Int

Element count

Element count

Retuns element count

Definition Classes
Inherited from
Basis
Source
Collection.scala