Class ObservableCollections
- java.lang.Object
-
- org.jdesktop.observablecollections.ObservableCollections
-
public final class ObservableCollections extends java.lang.Object
ObservableCollections
provides factory methods for creating observable lists and maps.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ObservableCollections.ObservableListHelper<E>
ObservableListHelper
is created byobservableListHelper
, and useful when changes to individual elements of the list can be tracked.
-
Constructor Summary
Constructors Constructor Description ObservableCollections()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <E> ObservableList<E>
observableList(java.util.List<E> list)
Creates and returns anObservableList
wrapping the suppliedList
.static <E> ObservableCollections.ObservableListHelper<E>
observableListHelper(java.util.List<E> list)
Creates and returns anObservableListHelper
wrapping the suppliedList
.static <K,V>
ObservableMap<K,V>observableMap(java.util.Map<K,V> map)
Creates and returns anObservableMap
wrapping the suppliedMap
.
-
-
-
Method Detail
-
observableMap
public static <K,V> ObservableMap<K,V> observableMap(java.util.Map<K,V> map)
Creates and returns anObservableMap
wrapping the suppliedMap
.- Parameters:
map
- theMap
to wrap- Returns:
- an
ObservableMap
- Throws:
java.lang.IllegalArgumentException
- ifmap
isnull
-
observableList
public static <E> ObservableList<E> observableList(java.util.List<E> list)
Creates and returns anObservableList
wrapping the suppliedList
.- Parameters:
list
- theList
to wrap- Returns:
- an
ObservableList
- Throws:
java.lang.IllegalArgumentException
- iflist
isnull
-
observableListHelper
public static <E> ObservableCollections.ObservableListHelper<E> observableListHelper(java.util.List<E> list)
Creates and returns anObservableListHelper
wrapping the suppliedList
. If you can track changes to the underlying list, use this method instead ofobservableList()
.- Parameters:
list
- theList
to wrap- Returns:
- an
ObservableList
- Throws:
java.lang.IllegalArgumentException
- iflist
isnull
- See Also:
observableList(java.util.List<E>)
-
-