Class DynamicallyMappedList<E,F>

java.lang.Object
org.reactfx.ObservableBase<LiveList.Observer<? super F,?>,QuasiListChange<? extends F>>
org.reactfx.collection.LiveListBase<F>
org.reactfx.collection.DynamicallyMappedList<E,F>
All Implemented Interfaces:
Iterable<F>, Collection<F>, List<F>, SequencedCollection<F>, javafx.beans.Observable, javafx.collections.ObservableList<F>, AccessorListMethods<F>, LiveList<F>, ProperLiveList<F>, UnmodifiableByDefaultList<F>, UnmodifiableByDefaultLiveList<F>, Observable<LiveList.Observer<? super F,?>>, ProperObservable<LiveList.Observer<? super F,?>,QuasiListChange<? extends F>>

class DynamicallyMappedList<E,F> extends LiveListBase<F> implements UnmodifiableByDefaultLiveList<F>
  • Field Details

    • source

      private final javafx.collections.ObservableList<? extends E> source
    • mapper

      private final Val<? extends Function<? super E,? extends F>> mapper
  • Constructor Details

    • DynamicallyMappedList

      public DynamicallyMappedList(javafx.collections.ObservableList<? extends E> source, javafx.beans.value.ObservableValue<? extends Function<? super E,? extends F>> mapper)
  • Method Details

    • get

      public F get(int index)
      Specified by:
      get in interface List<E>
    • size

      public int size()
      Specified by:
      size in interface Collection<E>
      Specified by:
      size in interface List<E>
    • observeInputs

      protected Subscription observeInputs()
      Description copied from class: ObservableBase
      Starts observing this observable's input(s), if any. This method is called when the number of observers goes from 0 to 1. This method is called before ObservableBase.newObserver(Object) is called for the first observer.
      Specified by:
      observeInputs in class ObservableBase<LiveList.Observer<? super F,?>,QuasiListChange<? extends F>>
      Returns:
      subscription used to stop observing inputs. The subscription is unsubscribed (i.e. input observation stops) when the number of observers goes down to 0.
    • sourceChanged

      private void sourceChanged(QuasiListChange<? extends E> change)
    • mapperInvalidated

      private void mapperInvalidated(Function<? super E,? extends F> oldMapper)