Spec-Zone .ru
спецификации, руководства, описания, API
|
T
- actual array instance typepublic interface ObservableArray<T extends ObservableArray<T>> extends Observable
capacity
which is internal array length
and size
. If size needs to be increased beyond capacity the capacity
increases to match that new size. Use trimToSize()
method
to shrink it.ArrayChangeListener
Modifier and Type | Method and Description |
---|---|
void |
addListener(ArrayChangeListener<T> listener)
Add a listener to this observable array.
|
void |
clear()
Sets size of array to 0.
|
void |
ensureCapacity(int capacity)
Grows capacity if it is less then given
value , does nothing if
it already exceeds the value . |
void |
removeListener(ArrayChangeListener<T> listener)
Tries to removed a listener from this observable array.
|
void |
resize(int size)
Sets new length of data in this array.
|
int |
size()
Retrieves length of data in this array.
|
void |
trimToSize()
Shrinks capacity to the current size of data in the array.
|
addListener, removeListener
void addListener(ArrayChangeListener<T> listener)
listener
- the listener for listening to the array changesvoid removeListener(ArrayChangeListener<T> listener)
listener
- a listener to removevoid resize(int size)
clear()
before setting it to new value. New elements
will be set to 0.void ensureCapacity(int capacity)
value
, does nothing if
it already exceeds the value
.capacity
- void trimToSize()
void clear()
int size()
Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved. Use is subject to