Class ObservableListFacade<E>

Type Parameters:
E - the element type
All Implemented Interfaces:
Iterable<E>, Collection<E>, List<E>, SequencedCollection<E>, javafx.beans.Observable, javafx.collections.ObservableList<E>

public class ObservableListFacade<E> extends ListFacade<E> implements javafx.collections.ObservableList<E>
Wraps a ReadOnlyList in the ObservableList interface.

The underlying ReadOnlyList is referenced - not copied. This allows to pass a ReadOnlyList to a client who does not understand the ReadOnlyList APi.

Author:
Werner Randelshofer
  • Constructor Details

  • Method Details

    • addListener

      public void addListener(javafx.collections.ListChangeListener<? super E> listener)
      Specified by:
      addListener in interface javafx.collections.ObservableList<E>
    • removeListener

      public void removeListener(javafx.collections.ListChangeListener<? super E> listener)
      Specified by:
      removeListener in interface javafx.collections.ObservableList<E>
    • addAll

      @SafeVarargs public final boolean addAll(E... elements)
      Specified by:
      addAll in interface javafx.collections.ObservableList<E>
    • setAll

      @SafeVarargs public final boolean setAll(E... elements)
      Specified by:
      setAll in interface javafx.collections.ObservableList<E>
    • setAll

      public boolean setAll(Collection<? extends E> col)
      Specified by:
      setAll in interface javafx.collections.ObservableList<E>
    • removeAll

      @SafeVarargs public final boolean removeAll(E... elements)
      Specified by:
      removeAll in interface javafx.collections.ObservableList<E>
    • retainAll

      @SafeVarargs public final boolean retainAll(E... elements)
      Specified by:
      retainAll in interface javafx.collections.ObservableList<E>
    • remove

      public void remove(int from, int to)
      Specified by:
      remove in interface javafx.collections.ObservableList<E>
    • addListener

      public void addListener(javafx.beans.InvalidationListener listener)
      Specified by:
      addListener in interface javafx.beans.Observable
    • removeListener

      public void removeListener(javafx.beans.InvalidationListener listener)
      Specified by:
      removeListener in interface javafx.beans.Observable