Interface ObservableList<E>

Type Parameters:
E - the type of elements in the list
All Superinterfaces:
Collection<E>, Iterable<E>, List<E>
All Known Implementing Classes:
ObservableListBase

public interface ObservableList<E> extends List<E>
A list that can be observed for changes.

A change will be fired whenever elements are added or removed from the list and can be listened to by adding a ListChangeListener.

Since:
1.0.0
  • Method Details

    • addListener

      void addListener(ListChangeListener<? super E> listener)
      Adds a listener that is called whenever the list changes.
      Parameters:
      listener - the listener
      Since:
      1.0.0
    • removeListener

      void removeListener(ListChangeListener<? super E> listener)
      Removes a listener.
      Parameters:
      listener - the listener
      Since:
      1.0.0
    • addAll

      boolean addAll(E... elements)
      A convenience method to add varargs elements to the list.
      Parameters:
      elements - the elements to add
      Returns:
      true if the list was changed as a result of this call
      Since:
      1.0.0
    • removeAll

      boolean removeAll(E... elements)
      A convenience method to remove varargs elements from the list.
      Parameters:
      elements - the elements to remove
      Returns:
      true if the list was changed as a result of this call
      Since:
      1.0.0