Class Change<E>
java.lang.Object
io.github.somesourcecode.someguiapi.collections.Change<E>
- Type Parameters:
E- the type of elements in the list
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the list of elements that were added.Returns the list of elements that were removed.booleanwasAdded()Returns whether elements were added.booleanReturns whether elements were removed.
-
Constructor Details
-
Change
Constructs a new change with the specified added and removed sublists.- Parameters:
addedSubList- the added sublistremovedSubList- the removed sublist- Since:
- 1.0.0
-
-
Method Details
-
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
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
-