Spec-Zone.ru › OpenJavaFX 8
javafx.collections

Class SetChangeListener.Change<E>

java.lang.Object
  • javafx.collections.SetChangeListener.Change<E>

Type Parameters:

E - element type

Enclosing interface:

SetChangeListener<E>



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.

Since:

JavaFX 2.1

  • Constructor Summary

    Constructors
    Constructor and Description
    Change(ObservableSet<E> set)
    Constructs a change associated with a set.
  • Method Summary

    All MethodsInstance MethodsAbstract MethodsConcrete Methods
    Modifier and Type Method and Description
    abstract E getElementAdded()
    Get the new element.
    abstract E getElementRemoved()
    Get the old element.
    ObservableSet<E> getSet()
    An observable set that is associated with the change.
    abstract boolean wasAdded()
    If this change is a result of add operation.
    abstract boolean wasRemoved()
    If this change is a result of removal operation.
    • Methods inherited from class java.lang.Object

      clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Detail

    • Change

      public Change(ObservableSet<E> set)
      Constructs a change associated with a set.

      Parameters:

      set - the source of the change

  • Method Detail

    • getSet

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

      Returns:

      the source set

    • wasAdded

      public abstract boolean wasAdded()
      If this change is a result of add operation.

      Returns:

      true if a new element was added to the set

    • wasRemoved

      public abstract boolean wasRemoved()
      If this change is a result of removal operation.

      Returns:

      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.

      Returns:

      the element that was just added

    • getElementRemoved

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

      Returns:

      the element that was just removed

© 2008, 2025, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from JavaFX API Documentation.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Java, JavaFX and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API