java.lang.Object
io.github.palexdev.materialfx.utils.ListChangeProcessor
Helper class to process changes in
ObservableLists.
It's capable of computing additions and removals.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcomputeAddition(int addedSize, int offset) Computes additions given the number of items added and the index at which the addition occurred.voidcomputeRemoval(Set<Integer> removed, int offset) Computes removals given the Set of removed indexes and the index at which the removal occurred.
-
Constructor Details
-
ListChangeProcessor
-
-
Method Details
-
computeAddition
public void computeAddition(int addedSize, int offset) Computes additions given the number of items added and the index at which the addition occurred. All items after the given offset must be shifted of addedSize.- Parameters:
addedSize- the number of items addedoffset- the index at which the addition occurred
-
computeRemoval
Computes removals given the Set of removed indexes and the index at which the removal occurred. All items after the offset must be shifted, to correctly compute this shift,findShift(Set, int)is used.- Parameters:
removed- the Set of removed indexesoffset- the index at which the removal occurred
-
getIndexes
- Returns:
- the updated indexes
-