Class UpdatedCollectionItemChange<T>

java.lang.Object
com.irurueta.hermes.CollectionItemChange
com.irurueta.hermes.UpdatedCollectionItemChange<T>
Type Parameters:
T - type of items in the collection.

public class UpdatedCollectionItemChange<T> extends CollectionItemChange
Class to represent a change in a collection item that has been updated.
  • Field Details

    • oldItem

      private final T oldItem
      Item before being updated.
    • newItem

      private final T newItem
      Item after being updated.
  • Constructor Details

    • UpdatedCollectionItemChange

      public UpdatedCollectionItemChange(T oldItem, T newItem)
      Constructor.
      Parameters:
      oldItem - item that before being updated.
      newItem - item after being updated.
      Throws:
      IllegalArgumentException - if either the old or new item is null.
  • Method Details

    • getOldItem

      public T getOldItem()
      Returns the item that before being updated.
      Returns:
      the item that before being updated.
    • getNewItem

      public T getNewItem()
      Returns the item that after being updated.
      Returns:
      the item that after being updated.