Interface OortList.ElementListener<E>

Type Parameters:
E - the element type
All Superinterfaces:
java.util.EventListener
Enclosing class:
OortList<E>

public static interface OortList.ElementListener<E>
extends java.util.EventListener
Listener for element events that update the entity list, either locally or remotely.
  • Method Summary

    Modifier and Type Method Description
    default void onAdded​(OortObject.Info<java.util.List<E>> info, java.util.List<E> elements)
    Callback method invoked when elements are added to the entity list.
    default void onRemoved​(OortObject.Info<java.util.List<E>> info, java.util.List<E> elements)
    Callback method invoked when elements are removed from the entity list.
  • Method Details

    • onAdded

      default void onAdded​(OortObject.Info<java.util.List<E>> info, java.util.List<E> elements)
      Callback method invoked when elements are added to the entity list.
      Parameters:
      info - the OortObject.Info that was changed by the addition
      elements - the elements added
    • onRemoved

      default void onRemoved​(OortObject.Info<java.util.List<E>> info, java.util.List<E> elements)
      Callback method invoked when elements are removed from the entity list.
      Parameters:
      info - the OortObject.Info that was changed by the removal
      elements - the elements removed