APIdia Launch Partner
Top Description Methods
javafx.collections

public Interface ObservableIntegerArray

extends ObservableArray<ObservableIntegerArray>
Known Direct Implementers
com.sun.javafx.collections.ObservableIntegerArrayImpl

ObservableIntegerArray is an int[] array that allows listeners to track changes when they occur. In order to track changes, the internal array is encapsulated and there is no direct access available from the outside. Bulk operations are supported but they always do a copy of the data range.
Since
JavaFX 8.0
See Also
ArrayChangeListener

Method Summary

Modifier and TypeMethod and Description
public void
addAll(int...
elements to append
elements
)

Appends given elements to the end of this array.

public void
addAll(ObservableIntegerArray
observable array with elements to append
src
)

Appends content of a given observable array to the end of this array.

public void
addAll(int[]
source array
src
,
int
starting position in source array
srcIndex
,
int
length of portion to append
length
)

Appends a portion of given array to the end of this array.

public void
addAll(ObservableIntegerArray
source observable array
src
,
int
starting position in source array
srcIndex
,
int
length of portion to append
length
)

Appends a portion of given observable array to the end of this array.

public void
copyTo(int
starting position in the observable array
srcIndex
,
int[]
destination array
dest
,
int
starting position in destination array
destIndex
,
int
length of portion to copy
length
)

Copies specified portion of array into dest array.

public void
copyTo(int
starting position in the observable array
srcIndex
,
ObservableIntegerArray
destination observable array
dest
,
int
starting position in destination observable array
destIndex
,
int
length of portion to copy
length
)

Copies specified portion of array into dest observable array.

public int

Returns:

value at the given index
get
(int
index of element to get
index
)

Gets a single value of array.

public void
set(int
the starting destination position in this observable array
destIndex
,
int[]
source array to copy
src
,
int
starting position in source array
srcIndex
,
int
length of portion to copy
length
)

Copies a portion of specified array into this observable array.

public void
set(int
the starting destination position in this observable array
destIndex
,
ObservableIntegerArray
source observable array to copy
src
,
int
starting position in source array
srcIndex
,
int
length of portion to copy
length
)

Copies a portion of specified observable array into this observable array.

public void
set(int
index of the value to set
index
,
int
new value for the given index
value
)

Sets a single value in the array.

public void
setAll(int...
elements to put into array content
elements
)

Replaces this observable array content with given elements.

public void
setAll(int[]
source array to copy.
src
,
int
starting position in source observable array
srcIndex
,
int
length of a portion to copy
length
)

Replaces this observable array content with a copy of portion of a given array.

public void
setAll(ObservableIntegerArray
source observable array to copy.
src
)

Replaces this observable array content with a copy of given observable array.

public void
setAll(ObservableIntegerArray
source observable array to copy.
src
,
int
starting position in source observable array
srcIndex
,
int
length of a portion to copy
length
)

Replaces this observable array content with a portion of a given observable array.

public int[]

Returns:

an int array containing the copy of the observable array
toArray
(int[]
the array into which the observable array to be copied, if it is big enough; otherwise, a new int array is allocated. Ignored, if null.
dest
)

Returns an array containing copy of the observable array.

public int[]

Returns:

an int array containing the copy of specified portion the observable array
toArray
(int
starting position in the observable array
srcIndex
,
int[]
the array into which specified portion of the observable array to be copied, if it is big enough; otherwise, a new int array is allocated. Ignored, if null.
dest
,
int
length of portion to copy
length
)

Returns an array containing copy of specified portion of the observable array.

Inherited from javafx.collections.ObservableArray:
addListenerclearensureCapacityremoveListenerresizesizetrimToSize

Method Detail

addAllback to summary
public void addAll(int... elements)

Appends given elements to the end of this array. Capacity is increased if necessary to match the new size of the data.

Parameters
elements:int[]

elements to append

addAllback to summary
public void addAll(ObservableIntegerArray src)

Appends content of a given observable array to the end of this array. Capacity is increased if necessary to match the new size of the data.

Parameters
src:ObservableIntegerArray

observable array with elements to append

addAllback to summary
public void addAll(int[] src, int srcIndex, int length)

Appends a portion of given array to the end of this array. Capacity is increased if necessary to match the new size of the data.

Parameters
src:int[]

source array

srcIndex:int

starting position in source array

length:int

length of portion to append

addAllback to summary
public void addAll(ObservableIntegerArray src, int srcIndex, int length)

Appends a portion of given observable array to the end of this array. Capacity is increased if necessary to match the new size of the data.

Parameters
src:ObservableIntegerArray

source observable array

srcIndex:int

starting position in source array

length:int

length of portion to append

copyToback to summary
public void copyTo(int srcIndex, int[] dest, int destIndex, int length)

Copies specified portion of array into dest array. Throws the same exceptions as System.arraycopy() method.

Parameters
srcIndex:int

starting position in the observable array

dest:int[]

destination array

destIndex:int

starting position in destination array

length:int

length of portion to copy

copyToback to summary
public void copyTo(int srcIndex, ObservableIntegerArray dest, int destIndex, int length)

Copies specified portion of array into dest observable array. Throws the same exceptions as System.arraycopy() method.

Parameters
srcIndex:int

starting position in the observable array

dest:ObservableIntegerArray

destination observable array

destIndex:int

starting position in destination observable array

length:int

length of portion to copy

getback to summary
public int get(int index)

Gets a single value of array. This is generally as fast as direct access to an array and eliminates necessity to make a copy of array.

Parameters
index:int

index of element to get

Returns:int

value at the given index

Exceptions
ArrayIndexOutOfBoundsException:
if index is outside array bounds
setback to summary
public void set(int destIndex, int[] src, int srcIndex, int length)

Copies a portion of specified array into this observable array. Throws the same exceptions as System.arraycopy() method.

Parameters
destIndex:int

the starting destination position in this observable array

src:int[]

source array to copy

srcIndex:int

starting position in source array

length:int

length of portion to copy

setback to summary
public void set(int destIndex, ObservableIntegerArray src, int srcIndex, int length)

Copies a portion of specified observable array into this observable array. Throws the same exceptions as System.arraycopy() method.

Parameters
destIndex:int

the starting destination position in this observable array

src:ObservableIntegerArray

source observable array to copy

srcIndex:int

starting position in source array

length:int

length of portion to copy

setback to summary
public void set(int index, int value)

Sets a single value in the array. Avoid using this method if many values are updated, use set(int, int[], int, int) update method instead with as minimum number of invocations as possible.

Parameters
index:int

index of the value to set

value:int

new value for the given index

Exceptions
ArrayIndexOutOfBoundsException:
if index is outside array bounds
setAllback to summary
public void setAll(int... elements)

Replaces this observable array content with given elements. Capacity is increased if necessary to match the new size of the data.

Parameters
elements:int[]

elements to put into array content

Exceptions
NullPointerException:
if src is null
setAllback to summary
public void setAll(int[] src, int srcIndex, int length)

Replaces this observable array content with a copy of portion of a given array. Capacity is increased if necessary to match the new size of the data.

Parameters
src:int[]

source array to copy.

srcIndex:int

starting position in source observable array

length:int

length of a portion to copy

Exceptions
NullPointerException:
if src is null
setAllback to summary
public void setAll(ObservableIntegerArray src)

Replaces this observable array content with a copy of given observable array. Capacity is increased if necessary to match the new size of the data.

Parameters
src:ObservableIntegerArray

source observable array to copy.

Exceptions
NullPointerException:
if src is null
setAllback to summary
public void setAll(ObservableIntegerArray src, int srcIndex, int length)

Replaces this observable array content with a portion of a given observable array. Capacity is increased if necessary to match the new size of the data.

Parameters
src:ObservableIntegerArray

source observable array to copy.

srcIndex:int

starting position in source observable array

length:int

length of a portion to copy

Exceptions
NullPointerException:
if src is null
toArrayback to summary
public int[] toArray(int[] dest)

Returns an array containing copy of the observable array. If the observable array fits in the specified array, it is copied therein. Otherwise, a new array is allocated with the size of the observable array.

Parameters
dest:int[]

the array into which the observable array to be copied, if it is big enough; otherwise, a new int array is allocated. Ignored, if null.

Returns:int[]

an int array containing the copy of the observable array

toArrayback to summary
public int[] toArray(int srcIndex, int[] dest, int length)

Returns an array containing copy of specified portion of the observable array. If specified portion of the observable array fits in the specified array, it is copied therein. Otherwise, a new array of given length is allocated.

Parameters
srcIndex:int

starting position in the observable array

dest:int[]

the array into which specified portion of the observable array to be copied, if it is big enough; otherwise, a new int array is allocated. Ignored, if null.

length:int

length of portion to copy

Returns:int[]

an int array containing the copy of specified portion the observable array