Top Description Fields Constructors Methods
com.sun.javafx.collections

public Class ObservableIntegerArrayImpl

extends ObservableArrayBase<ObservableIntegerArray>
implements ObservableIntegerArray
Class Inheritance
All Implemented Interfaces
javafx.collections.ObservableIntegerArray, javafx.collections.ObservableArray, javafx.beans.Observable
Imports
java.util.Arrays, javafx.collections.ObservableArrayBase, .ObservableIntegerArray

ObservableIntegerArray default implementation.

Field Summary

Modifier and TypeField and Description
private int[]
private static final int[]
private static final int
MAX_ARRAY_SIZE

The maximum size of array to allocate.

private int

Constructor Summary

AccessConstructor and Description
public
ObservableIntegerArrayImpl()

Creates empty observable integer array

public
ObservableIntegerArrayImpl(int...
initial values to copy to observable integer array
elements
)

Creates observable integer array with copy of given initial values

public
ObservableIntegerArrayImpl(ObservableIntegerArray
observable integer array to copy
src
)

Creates observable integer array with copy of given observable integer array

Method Summary

Modifier and TypeMethod and Description
public void
addAll(ObservableIntegerArray src)

Implements javafx.collections.ObservableIntegerArray.addAll.

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

public void
addAll(int... elements)

Implements javafx.collections.ObservableIntegerArray.addAll.

Appends given elements to the end of this array.

public void
addAll(ObservableIntegerArray src, int srcIndex, int length)

Implements javafx.collections.ObservableIntegerArray.addAll.

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

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

Implements javafx.collections.ObservableIntegerArray.addAll.

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

private void
addAllInternal(ObservableIntegerArray src, int srcIndex, int length)

private void
addAllInternal(int[] src, int srcIndex, int length)

public void
clear()

Implements javafx.collections.ObservableArray.clear.

Empties the array by resizing it to 0.

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

Implements javafx.collections.ObservableIntegerArray.copyTo.

Copies specified portion of array into dest array.

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

Implements javafx.collections.ObservableIntegerArray.copyTo.

Copies specified portion of array into dest observable array.

public void
ensureCapacity(int capacity)

Implements javafx.collections.ObservableArray.ensureCapacity.

Grows the capacity of this array if the current capacity is less than given capacity, does nothing if it already exceeds the capacity.

public int
get(int index)

Implements javafx.collections.ObservableIntegerArray.get.

Gets a single value of array.

private void
growCapacity(int length)

private static int
hugeCapacity(int minCapacity)

private void
rangeCheck(int size)

private void
rangeCheck(ObservableIntegerArray src, int srcIndex, int length)

private void
rangeCheck(int[] src, int srcIndex, int length)

public void
resize(int newSize)

Implements javafx.collections.ObservableArray.resize.

Sets new length of data in this array.

public void
set(int destIndex, int[] src, int srcIndex, int length)

Implements javafx.collections.ObservableIntegerArray.set.

Copies a portion of specified array into this observable array.

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

Implements javafx.collections.ObservableIntegerArray.set.

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

public void
set(int index, int value)

Implements javafx.collections.ObservableIntegerArray.set.

Sets a single value in the array.

public void
setAll(ObservableIntegerArray src)

Implements javafx.collections.ObservableIntegerArray.setAll.

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

public void
setAll(ObservableIntegerArray src, int srcIndex, int length)

Implements javafx.collections.ObservableIntegerArray.setAll.

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

public void
setAll(int[] src, int srcIndex, int length)

Implements javafx.collections.ObservableIntegerArray.setAll.

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

public void
setAll(int... src)

Implements javafx.collections.ObservableIntegerArray.setAll.

Replaces this observable array content with given elements.

private void
setAllInternal(ObservableIntegerArray src, int srcIndex, int length)

private void
setAllInternal(int[] src, int srcIndex, int length)

public int
size()

Implements javafx.collections.ObservableArray.size.

Retrieves length of data in this array.

public int[]
toArray(int[] dest)

Implements javafx.collections.ObservableIntegerArray.toArray.

Returns an array containing copy of the observable array.

public int[]
toArray(int index, int[] dest, int length)

Implements javafx.collections.ObservableIntegerArray.toArray.

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

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

public void
trimToSize()

Implements javafx.collections.ObservableArray.trimToSize.

Shrinks the capacity to the current size of data in the array.

Inherited from javafx.collections.ObservableArrayBase:
addListeneraddListenerfireChangeremoveListenerremoveListener

Field Detail

arrayback to summary
private int[] array
INITIALback to summary
private static final int[] INITIAL
MAX_ARRAY_SIZEback to summary
private static final int MAX_ARRAY_SIZE

The maximum size of array to allocate. Some VMs reserve some header words in an array. Attempts to allocate larger arrays may result in OutOfMemoryError: Requested array size exceeds VM limit

sizeback to summary
private int size

Constructor Detail

ObservableIntegerArrayImplback to summary
public ObservableIntegerArrayImpl()

Creates empty observable integer array

ObservableIntegerArrayImplback to summary
public ObservableIntegerArrayImpl(int... elements)

Creates observable integer array with copy of given initial values

Parameters
elements:int[]

initial values to copy to observable integer array

ObservableIntegerArrayImplback to summary
public ObservableIntegerArrayImpl(ObservableIntegerArray src)

Creates observable integer array with copy of given observable integer array

Parameters
src:ObservableIntegerArray

observable integer array to copy

Method Detail

addAllback to summary
public void addAll(ObservableIntegerArray src)

Implements javafx.collections.ObservableIntegerArray.addAll.

Doc from javafx.collections.ObservableIntegerArray.addAll.

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.

Annotations
@Override
addAllback to summary
public void addAll(int... elements)

Implements javafx.collections.ObservableIntegerArray.addAll.

Doc from javafx.collections.ObservableIntegerArray.addAll.

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

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

Implements javafx.collections.ObservableIntegerArray.addAll.

Doc from javafx.collections.ObservableIntegerArray.addAll.

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.

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

Implements javafx.collections.ObservableIntegerArray.addAll.

Doc from javafx.collections.ObservableIntegerArray.addAll.

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.

Annotations
@Override
addAllInternalback to summary
private void addAllInternal(ObservableIntegerArray src, int srcIndex, int length)
addAllInternalback to summary
private void addAllInternal(int[] src, int srcIndex, int length)
clearback to summary
public void clear()

Implements javafx.collections.ObservableArray.clear.

Doc from javafx.collections.ObservableArray.clear.

Empties the array by resizing it to 0. Capacity is not changed.

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

Implements javafx.collections.ObservableIntegerArray.copyTo.

Doc from javafx.collections.ObservableIntegerArray.copyTo.

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

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

Implements javafx.collections.ObservableIntegerArray.copyTo.

Doc from javafx.collections.ObservableIntegerArray.copyTo.

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

Annotations
@Override
ensureCapacityback to summary
public void ensureCapacity(int capacity)

Implements javafx.collections.ObservableArray.ensureCapacity.

Doc from javafx.collections.ObservableArray.ensureCapacity.

Grows the capacity of this array if the current capacity is less than given capacity, does nothing if it already exceeds the capacity.

Annotations
@Override
getback to summary
public int get(int index)

Implements javafx.collections.ObservableIntegerArray.get.

Doc from javafx.collections.ObservableIntegerArray.get.

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.

Annotations
@Override
growCapacityback to summary
private void growCapacity(int length)
hugeCapacityback to summary
private static int hugeCapacity(int minCapacity)
rangeCheckback to summary
private void rangeCheck(int size)
rangeCheckback to summary
private void rangeCheck(ObservableIntegerArray src, int srcIndex, int length)
rangeCheckback to summary
private void rangeCheck(int[] src, int srcIndex, int length)
resizeback to summary
public void resize(int newSize)

Implements javafx.collections.ObservableArray.resize.

Doc from javafx.collections.ObservableArray.resize.

Sets new length of data in this array. This method grows capacity if necessary but never shrinks it. Resulting array will contain existing data for indexes that are less than the current size and zeroes for indexes that are greater than the current size.

Annotations
@Override
setback to summary
public void set(int destIndex, int[] src, int srcIndex, int length)

Implements javafx.collections.ObservableIntegerArray.set.

Doc from javafx.collections.ObservableIntegerArray.set.

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

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

Implements javafx.collections.ObservableIntegerArray.set.

Doc from javafx.collections.ObservableIntegerArray.set.

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

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

Implements javafx.collections.ObservableIntegerArray.set.

Doc from javafx.collections.ObservableIntegerArray.set.

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.

Annotations
@Override
setAllback to summary
public void setAll(ObservableIntegerArray src)

Implements javafx.collections.ObservableIntegerArray.setAll.

Doc from javafx.collections.ObservableIntegerArray.setAll.

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.

Annotations
@Override
setAllback to summary
public void setAll(ObservableIntegerArray src, int srcIndex, int length)

Implements javafx.collections.ObservableIntegerArray.setAll.

Doc from javafx.collections.ObservableIntegerArray.setAll.

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.

Annotations
@Override
setAllback to summary
public void setAll(int[] src, int srcIndex, int length)

Implements javafx.collections.ObservableIntegerArray.setAll.

Doc from javafx.collections.ObservableIntegerArray.setAll.

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.

Annotations
@Override
setAllback to summary
public void setAll(int... src)

Implements javafx.collections.ObservableIntegerArray.setAll.

Doc from javafx.collections.ObservableIntegerArray.setAll.

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

Annotations
@Override
setAllInternalback to summary
private void setAllInternal(ObservableIntegerArray src, int srcIndex, int length)
setAllInternalback to summary
private void setAllInternal(int[] src, int srcIndex, int length)
sizeback to summary
public int size()

Implements javafx.collections.ObservableArray.size.

Doc from javafx.collections.ObservableArray.size.

Retrieves length of data in this array.

Annotations
@Override
toArrayback to summary
public int[] toArray(int[] dest)

Implements javafx.collections.ObservableIntegerArray.toArray.

Doc from javafx.collections.ObservableIntegerArray.toArray.

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.

Annotations
@Override
toArrayback to summary
public int[] toArray(int index, int[] dest, int length)

Implements javafx.collections.ObservableIntegerArray.toArray.

Doc from javafx.collections.ObservableIntegerArray.toArray.

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.

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Annotations
@Override
trimToSizeback to summary
public void trimToSize()

Implements javafx.collections.ObservableArray.trimToSize.

Doc from javafx.collections.ObservableArray.trimToSize.

Shrinks the capacity to the current size of data in the array.

Annotations
@Override