Class ReversedObservableList<E>

java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
javafx.collections.ObservableListBase<E>
javafx.collections.transformation.TransformationList<E,E>
org.jhotdraw8.fxcollection.ReversedObservableList<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 ReversedObservableList<E> extends javafx.collections.transformation.TransformationList<E,E>
Reversed list provides a view on an underlying list with items ordered in reverse.
Author:
Werner Randelshofer
  • Constructor Details

    • ReversedObservableList

      public ReversedObservableList(javafx.collections.ObservableList<E> source)
  • Method Details

    • sourceChanged

      protected void sourceChanged(javafx.collections.ListChangeListener.Change<? extends E> c)
      Specified by:
      sourceChanged in class javafx.collections.transformation.TransformationList<E,E>
    • getSourceIndex

      public int getSourceIndex(int index)
      Specified by:
      getSourceIndex in class javafx.collections.transformation.TransformationList<E,E>
    • getViewIndex

      public int getViewIndex(int index)
      Specified by:
      getViewIndex in class javafx.collections.transformation.TransformationList<E,E>
    • get

      public E get(int index)
      Specified by:
      get in interface List<E>
      Specified by:
      get in class AbstractList<E>
    • set

      public E set(int index, E e)
      Specified by:
      set in interface List<E>
      Overrides:
      set in class AbstractList<E>
    • remove

      public E remove(int index)
      Specified by:
      remove in interface List<E>
      Overrides:
      remove in class AbstractList<E>
    • remove

      public boolean remove(Object o)
      Specified by:
      remove in interface Collection<E>
      Specified by:
      remove in interface List<E>
      Overrides:
      remove in class AbstractCollection<E>
    • size

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

      public void add(int index, E element)
      Specified by:
      add in interface List<E>
      Overrides:
      add in class AbstractList<E>
    • fireUpdated

      public void fireUpdated(int from, int to)
      Notifies all listeners of a change
      Parameters:
      from - start of range
      to - end of range + 1