Module javafx.base

Class SetChangeListener.Change<E>

  • Type Parameters:
    E - element type
    Enclosing interface:

    public abstract static class SetChangeListener.Change<E>
    extends Object
    An elementary change done to an ObservableSet. Change contains information about an add or remove operation. Note that adding element that is already in the set does not modify the set and hence no change will be generated.
    JavaFX 2.1
    • Constructor Detail

      • Change

        public Change​(ObservableSet<E> set)
        Constructs a change associated with a set.
        set - the source of the change
    • Method Detail

      • getSet

        public ObservableSet<E> getSet()
        An observable set that is associated with the change.
        the source set
      • wasAdded

        public abstract boolean wasAdded()
        If this change is a result of add operation.
        true if a new element was added to the set
      • wasRemoved

        public abstract boolean wasRemoved()
        If this change is a result of removal operation.
        true if an old element was removed from the set
      • getElementAdded

        public abstract E getElementAdded()
        Get the new element. Return null if this is a removal.
        the element that was just added
      • getElementRemoved

        public abstract E getElementRemoved()
        Get the old element. Return null if this is an addition.
        the element that was just removed