ObservableFloatArray is a float[] 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.
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 - source observable array to copy.
srcIndex - starting position in source observable array
Copies a portion of specified observable array into this observable array.
Throws the same exceptions as System.arraycopy() method.
Parameters:
destIndex - the starting destination position in this observable array
src - source observable array to copy
srcIndex - starting position in source array
length - length of portion to copy
set
voidset(int index,
float value)
Sets a single value in the array. Avoid using this method if many values
are updated, use set(int, float[], int, int) update method
instead with as minimum number of invocations as possible.
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 - the array into which the observable array to be copied,
if it is big enough; otherwise, a new float array is allocated.
Ignored, if null.
Returns:
a float array containing the copy of the observable array
toArray
float[]toArray(int srcIndex,
float[] 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 - starting position in the observable array
dest - the array into which specified portion of the observable array
to be copied, if it is big enough;
otherwise, a new float array is allocated.
Ignored, if null.
length - length of portion to copy
Returns:
a float array containing the copy of specified portion the observable array