ObservableArray

abstract class ObservableArray[V, T <: ObservableArray[V, T, D], D <: ObservableArray[D]](val delegate: D)(`evidence$1`: ClassTag[V]) extends Builder[V, T] with Observable with SFXDelegate[D]

Abstract ObservableArray base class.

Abstract ObservableArray base class.

Companion
object
trait SFXDelegate[D]
trait Builder[V, T]
trait Growable[V]
trait Clearable
class Object
trait Matchable
class Any

Value members

Abstract methods

def addAll(src: T): Unit

Append given observable array to the end of this array.

Append given observable array to the end of this array.

Capacity is increased, if necessary, to match the new size of the data.

Value Params
src

Elements to be appended.

Throws
java.lang.ArrayStoreException

if element in src array could not be stored in this array due to a type mismatch.

java.lang.NullPointerException

if src is null.

def addAll(elems: V*): Unit

Append given elements to the end of this array.

Append given elements to the end of this array.

Capacity is increased, if necessary, to match the new size of the data.

Value Params
elems

Elements to be appended.

Throws
java.lang.ArrayStoreException

if element in elements could not be stored in this array due to a type mismatch.

java.lang.NullPointerException

if elements is null.

def addAll(src: Array[V], srcIdx: Int, length: Int): Unit

Append portion of given regular array to the end of this array.

Append portion of given regular array to the end of this array.

Capacity is increased, if necessary, to match the new size of the data.

Value Params
length

Number of data elements to be appended.

src

Elements to be appended.

srcIdx

Start position in the src array.

Throws
java.lang.ArrayIndexOutOfBoundsException

if copying would cause access out of src array bounds.

java.lang.ArrayStoreException

if element in src array could not be stored in this array due to a type mismatch.

java.lang.NullPointerException

if src is null.

def addAll(src: T, srcIdx: Int, length: Int): Unit

Append portion of given regular array to the end of this array.

Append portion of given regular array to the end of this array.

Capacity is increased, if necessary, to match the new size of the data.

Value Params
length

Number of data elements to be appended.

src

Elements to be appended.

srcIdx

Start position in the src array.

Throws
java.lang.ArrayIndexOutOfBoundsException

if copying would cause access out of src array bounds.

java.lang.ArrayStoreException

if element in src array could not be stored in this array due to a type mismatch.

java.lang.NullPointerException

if src is null.

def copyTo(srcIdx: Int, dest: Array[V], destIdx: Int, length: Int): Unit

Copy specified portion of this observable array to dest regular array.

Copy specified portion of this observable array to dest regular array.

Value Params
dest

Array into which the portion of this array is to be copied.

destIdx

Start position in the dest array.

length

Number of data elements to be copied.

srcIdx

Start position in this array.

Throws
java.lang.ArrayIndexOutOfBoundsException

if copying would cause access out of either array bounds.

java.lang.ArrayStoreException

if element in this array could not be stored in dest array due to a type mismatch.

java.lang.NullPointerException

if dest is null.

def copyTo(srcIdx: Int, dest: T, destIdx: Int, length: Int): Unit

Copy specified portion of this observable array to dest observable array.

Copy specified portion of this observable array to dest observable array.

Value Params
dest

Array into which the portion of this array is to be copied.

destIdx

Start position in the dest array.

length

Number of data elements to be copied.

srcIdx

Start position in this array.

Throws
java.lang.ArrayIndexOutOfBoundsException

if copying would cause access out of either array bounds.

java.lang.ArrayStoreException

if element in this array could not be stored in dest array due to a type mismatch.

java.lang.NullPointerException

if dest is null.

def get(idx: Int): V

Select the element at idx in the array.

Select the element at idx in the array.

Value Params
idx

Index of selected element.

Returns

Element at given idx.

Throws
java.lang.ArrayIndexOutOfBoundsException

if idx does not satisfy 0 <= idx < length.

def set(idx: Int, value: V): Unit

Set the element at idx in the array to value.

Set the element at idx in the array to value.

Value Params
idx

Index of element to be changed.

value

New value for element at idx.

Throws
java.lang.ArrayIndexOutOfBoundsException

if idx does not satisfy 0 <= idx < length.

def set(destIdx: Int, src: Array[V], srcIdx: Int, length: Int): Unit

Copy a portion of given regular array into this array, replacing affected contents.

Copy a portion of given regular array into this array, replacing affected contents.

Value Params
destIdx

Start position in this array.

length

Number of data elements to be copied.

src

Array containing data to be copied.

srcIdx

Start position in src array.

Throws
java.lang.ArrayIndexOutOfBoundsException

if copying would cause access out of array bounds.

java.lang.ArrayStoreException

if element in src could not be stored in this array due to a type mismatch.

java.lang.NullPointerException

if src is null.

def set(destIdx: Int, src: T, srcIdx: Int, length: Int): Unit

Copy a portion of given observable array into this array, replacing affected contents.

Copy a portion of given observable array into this array, replacing affected contents.

Value Params
destIdx

Start position in this array.

length

Number of data elements to be copied.

src

Array containing data to be copied.

srcIdx

Start position in src array.

Throws
java.lang.ArrayIndexOutOfBoundsException

if copying would cause access out of array bounds.

java.lang.ArrayStoreException

if element in src could not be stored in this array due to a type mismatch.

java.lang.NullPointerException

if src is null.

def setAll(elems: V*): Unit

Replace the contents of this array with the given elements.

Replace the contents of this array with the given elements.

Capacity is increased, if necessary, to match the new size of the data.

Value Params
elems

New contents of this array.

Throws
java.lang.ArrayStoreException

if element in elements could not be stored in this array due to a type mismatch.

java.lang.NullPointerException

if elements is null.

def setAll(src: T): Unit

Replace the contents of this array with the given observable array.

Replace the contents of this array with the given observable array.

Capacity is increased, if necessary, to match the new size of the data.

Value Params
src

Array to replace contents this array.

Throws
java.lang.ArrayStoreException

if element in src could not be stored in this array due to a type mismatch.

java.lang.NullPointerException

if src is null.

def setAll(src: Array[V], srcIdx: Int, length: Int): Unit

Replace the contents of this array with portion of the given regular array.

Replace the contents of this array with portion of the given regular array.

Capacity is increased, if necessary, to match the new size of the data.

Value Params
length

Number of data elements to be copied.

src

Array to replace contents this array.

srcIdx

Start position in the src array.

Throws
java.lang.ArrayIndexOutOfBoundsException

if copying would cause access out of array bounds.

java.lang.ArrayStoreException

if element in src could not be stored in this array due to a type mismatch.

java.lang.NullPointerException

if src is null.

def setAll(src: T, srcIdx: Int, length: Int): Unit

Replace the contents of this array with portion of the given observable array.

Replace the contents of this array with portion of the given observable array.

Capacity is increased, if necessary, to match the new size of the data.

Value Params
length

Number of data elements to be copied.

src

Array to replace contents this array.

srcIdx

Start position in the src array.

Throws
java.lang.ArrayIndexOutOfBoundsException

if copying would cause access out of array bounds.

java.lang.ArrayStoreException

if element in src could not be stored in this array due to a type mismatch.

java.lang.NullPointerException

if src is null.

def toArray(dest: Array[V]): Array[V]

Write the contents of this array into the specified array, if it is large enough, or a new array if it is not.

Write the contents of this array into the specified array, if it is large enough, or a new array if it is not.

Value Params
dest

Array into which this array will be written, if large enough to hold this array's contents. If null, this argument is ignored.

Returns

The dest array if it is large enough to hold this array's data, or a new array, containing this array's copied contents.

Throws
java.lang.ArrayStoreException

if element in src could not be stored in this array due to a type mismatch.

def toArray(srcIdx: Int, dest: Array[V], length: Int): Array[V]

Write a portion of this array's contents into the specified array, if it is large enough, or a new array if it is not.

Write a portion of this array's contents into the specified array, if it is large enough, or a new array if it is not.

Value Params
dest

Array into which this array will be written, if large enough to hold this array's contents. If null, this argument is ignored.

length

Number of data elements to be copied.

srcIdx

Start position in this array.

Returns

The dest array if it is large enough to hold this array's data, or a new array, containing this array's copied contents.

Throws
java.lang.ArrayStoreException

if element in src could not be stored in this array due to a type mismatch.

Concrete methods

def ++=(src: Array[V]): T

Append another array to this array.

Append another array to this array.

Value Params
src

Array to be appended to this array.

Returns

This array, expanded to contain the indicated array.

def ++=(src: T): T

Append another observable array to this array.

Append another observable array to this array.

Value Params
src

Array to be appended to this array.

Returns

This array, expanded to contain the indicated array.

override def addOne(elem: V): ObservableArray[V, T, D]

Append new element to this ObservableArray.

Append new element to this ObservableArray.

Value Params
elem

Element to be added to end of this array.

Returns

This ObservableArray.

Definition Classes
Growable
def apply(idx: Int): V

Select an element by its index in the array.

Select an element by its index in the array.

Value Params
idx

Index of selected element.

Returns

Element at given idx.

Throws
java.lang.ArrayIndexOutOfBoundsException

if idx does not satisfy 0 <= idx < length.

override def clear(): Unit

Empty array, clearing builder contents, resizing it to zero.

Empty array, clearing builder contents, resizing it to zero.

Capacity is unchanged.

Definition Classes
Builder -> Clearable
def ensureCapacity(capacity: Int): Unit

Grow array capacity if currently smaller than given capacity; do nothing otherwise.

Grow array capacity if currently smaller than given capacity; do nothing otherwise.

Value Params
capacity

Required capacity.

def isEmpty: Boolean

Tests whether the collection is empty.

Tests whether the collection is empty.

Returns

true if the collection contains no elements, false otherwise.

def length: Int

Alias for size

Alias for size

def nonEmpty: Boolean

Tests whether the collection is not empty.

Tests whether the collection is not empty.

Returns

true if the collection contains at least one element, false otherwise.

def onChange(op: (T, Change) => Unit): Subscription

Add a listener function to Array's changes.

Add a listener function to Array's changes.

Value Params
op

Function that will handle this ObservableArray's modifications data, to be activated when some change is made.

Note

This function '''will handle''' this array's modifications data. That is, it will be notified which array has been modified and which array elements have been changed.

def onChange(op: => Unit): Subscription

Add a listener function to Array's changes.

Add a listener function to Array's changes.

Value Params
op

Function that will handle this ObservableArray's modifications data, to be activated when some change is made.

Note

This function '''will not handle''' this array's modifications data. That is, it will be notified that an array it is associated with has changed, but not which array the which data within it was changed.

override def result(): T

Produces collection from builder.

Produces collection from builder.

Returns

This ObservableArray.

Definition Classes
Builder
def size: Int

Retrieve length of data in this array.

Retrieve length of data in this array.

Returns

Length of data in this array.

def toArray: Array[V]

Translate this observable array to a regular array.

Translate this observable array to a regular array.

Returns

Regular array containing this array's contents.

def trimToSize(): Unit

Shrinks capacity to current length of data in this array.

Shrinks capacity to current length of data in this array.

def update(idx: Int, value: V): Unit

Set the element at idx in the array to value.

Set the element at idx in the array to value.

Value Params
idx

Index of element to be changed.

value

New value for element at idx.

Throws
java.lang.ArrayIndexOutOfBoundsException

if idx does not satisfy 0 <= idx < length.

Inherited methods

@inline
final def ++=(xs: IterableOnce[V]): ObservableArray[V, T, D]
Inherited from
Growable
@inline
final def +=(elem: V): ObservableArray[V, T, D]
Inherited from
Growable
def addAll(xs: IterableOnce[V]): ObservableArray[V, T, D]
Inherited from
Growable
override def equals(ref: Any): Boolean

Verifies if a object is equals to this delegate.

Verifies if a object is equals to this delegate.

Value Params
ref

Object to be compared.

Returns

if the other object is equals to this delegate or not.

Definition Classes
Inherited from
SFXDelegate
override def hashCode: Int
Returns

The delegate hashcode

Definition Classes
Inherited from
SFXDelegate
def knownSize: Int
Inherited from
Growable
def mapResult[NewTo](f: T => NewTo): Builder[V, NewTo]
Inherited from
Builder
def onInvalidate(op: => Unit): Subscription

Adds a no argument function as a JavaFX `InvalidationListener`. This function has no arguments because it will not handle invalidated values.

Adds a no argument function as a JavaFX `InvalidationListener`. This function has no arguments because it will not handle invalidated values.

Value Params
op

A Function with no arguments. It will be called when value was invalidated.

Returns

A new scalafx.event.subscriptions.Subscription to remove JavaFX InvalidationListener.

Inherited from
Observable

Adds a function as a JavaFX `InvalidationListener`. This function has all arguments from `invalidated` method from InvalidationListener.

Adds a function as a JavaFX `InvalidationListener`. This function has all arguments from `invalidated` method from InvalidationListener.

Value Params
op

Function that receives a ScalaFX Observable. It will be called when value was invalidated.

Returns

A new scalafx.event.subscriptions.Subscription to remove JavaFX InvalidationListener.

Inherited from
Observable
final def sizeHint(coll: IterableOnce[_], delta: Int): Unit
Inherited from
Builder
def sizeHint(size: Int): Unit
Inherited from
Builder
final def sizeHintBounded(size: Int, boundingColl: Iterable[_]): Unit
Inherited from
Builder
override def toString: String
Returns

Returns the original delegate's toString() adding a [SFX] prefix.

Definition Classes
Inherited from
SFXDelegate

Deprecated and Inherited methods

@inline @deprecated("Use `++=` aka `addAll` instead of varargs `+=`; infix operations with an operand of multiple args will be deprecated", "2.13.0")
final def +=(elem1: V, elem2: V, elems: V*): ObservableArray[V, T, D]
Deprecated
Inherited from
Growable

Concrete fields

override val delegate: D