public final class ObservableCollections
extends java.lang.Object
ObservableCollections
provides factory methods for creating
observable lists and maps.Modifier and Type | Class and Description |
---|---|
static class |
ObservableCollections.ObservableListHelper<E>
ObservableListHelper is created by observableListHelper ,
and useful when changes to individual elements of the list can be
tracked. |
Constructor and Description |
---|
ObservableCollections() |
Modifier and Type | Method and Description |
---|---|
static <E> ObservableList<E> |
observableList(java.util.List<E> list)
Creates and returns an
ObservableList wrapping the supplied
List . |
static <E> ObservableCollections.ObservableListHelper<E> |
observableListHelper(java.util.List<E> list)
Creates and returns an
ObservableListHelper wrapping
the supplied List . |
static <K,V> ObservableMap<K,V> |
observableMap(java.util.Map<K,V> map)
Creates and returns an
ObservableMap wrapping the supplied
Map . |
public static <K,V> ObservableMap<K,V> observableMap(java.util.Map<K,V> map)
ObservableMap
wrapping the supplied
Map
.map
- the Map
to wrapObservableMap
java.lang.IllegalArgumentException
- if map
is null
public static <E> ObservableList<E> observableList(java.util.List<E> list)
ObservableList
wrapping the supplied
List
.list
- the List
to wrapObservableList
java.lang.IllegalArgumentException
- if list
is null
public static <E> ObservableCollections.ObservableListHelper<E> observableListHelper(java.util.List<E> list)
ObservableListHelper
wrapping
the supplied List
. If you can track changes to the underlying
list, use this method instead of observableList()
.list
- the List
to wrapObservableList
java.lang.IllegalArgumentException
- if list
is null
observableList(java.util.List<E>)