java.lang.Object
io.github.somesourcecode.someguiapi.collections.Change<E>
Type Parameters:
E - the type of elements in the list

public class Change<E> extends Object
Represents a change in a list. It contains a list of elements that were added and a list of elements that were removed. If no elements were added or removed, the corresponding lists will be empty.
Since:
1.0.0
  • Constructor Details

    • Change

      public Change(List<? extends E> addedSubList, List<? extends E> removedSubList)
      Constructs a new change with the specified added and removed sublists.
      Parameters:
      addedSubList - the added sublist
      removedSubList - the removed sublist
      Since:
      1.0.0
  • Method Details

    • getAddedSubList

      public List<? extends E> getAddedSubList()
      Returns the list of elements that were added. If no elements were added, the list will be empty.
      Returns:
      the list of elements that were added
      Since:
      1.0.0
    • getRemovedSubList

      public List<? extends E> getRemovedSubList()
      Returns the list of elements that were removed. If no elements were removed, the list will be empty.
      Returns:
      the list of elements that were removed
      Since:
      1.0.0
    • wasAdded

      public boolean wasAdded()
      Returns whether elements were added.
      Returns:
      whether elements were added
      Since:
      1.0.0
    • wasRemoved

      public boolean wasRemoved()
      Returns whether elements were removed.
      Returns:
      whether elements were removed
      Since:
      1.0.0