Class ObservableCollections
- java.lang.Object
-
- org.jdesktop.observablecollections.ObservableCollections
-
public final class ObservableCollections extends Object
ObservableCollectionsprovides factory methods for creating observable lists and maps.- Author:
- sky
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classObservableCollections.ObservableListHelper<E>ObservableListHelperis 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(List<E> list)Creates and returns anObservableListwrapping the suppliedList.static <E> ObservableCollections.ObservableListHelper<E>observableListHelper(List<E> list)Creates and returns anObservableListHelperwrapping the suppliedList.static <K,V>
ObservableMap<K,V>observableMap(Map<K,V> map)Creates and returns anObservableMapwrapping the suppliedMap.
-
-
-
Method Detail
-
observableMap
public static <K,V> ObservableMap<K,V> observableMap(Map<K,V> map)
Creates and returns anObservableMapwrapping the suppliedMap.- Parameters:
map- theMapto wrap- Returns:
- an
ObservableMap - Throws:
IllegalArgumentException- ifmapisnull
-
observableList
public static <E> ObservableList<E> observableList(List<E> list)
Creates and returns anObservableListwrapping the suppliedList.- Parameters:
list- theListto wrap- Returns:
- an
ObservableList - Throws:
IllegalArgumentException- iflistisnull
-
observableListHelper
public static <E> ObservableCollections.ObservableListHelper<E> observableListHelper(List<E> list)
Creates and returns anObservableListHelperwrapping the suppliedList. If you can track changes to the underlying list, use this method instead ofobservableList().- Parameters:
list- theListto wrap- Returns:
- an
ObservableList - Throws:
IllegalArgumentException- iflistisnull- See Also:
observableList(java.util.List<E>)
-
-