Class ObservableCollections


  • public final class ObservableCollections
    extends Object
    ObservableCollections provides factory methods for creating observable lists and maps.
    Author:
    sky
    • Constructor Detail

      • ObservableCollections

        public ObservableCollections()
    • Method Detail

      • observableMap

        public static <K,​V> ObservableMap<K,​V> observableMap​(Map<K,​V> map)
        Creates and returns an ObservableMap wrapping the supplied Map.
        Parameters:
        map - the Map to wrap
        Returns:
        an ObservableMap
        Throws:
        IllegalArgumentException - if map is null
      • observableList

        public static <E> ObservableList<E> observableList​(List<E> list)
        Creates and returns an ObservableList wrapping the supplied List.
        Parameters:
        list - the List to wrap
        Returns:
        an ObservableList
        Throws:
        IllegalArgumentException - if list is null