public interface DuplicateRemovalFunction
Used by LuckPerms to remove duplicate entries from a MetaStack.
| Modifier and Type | Field and Description |
|---|---|
static DuplicateRemovalFunction |
FIRST_ONLY
A
DuplicateRemovalFunction that retains only the first occurrence. |
static DuplicateRemovalFunction |
LAST_ONLY
A
DuplicateRemovalFunction that retains only the last occurrence. |
static DuplicateRemovalFunction |
RETAIN_ALL
A
DuplicateRemovalFunction that does not remove duplicates. |
| Modifier and Type | Method and Description |
|---|---|
<T> void |
processDuplicates(@NonNull List<T> list)
Removes duplicates from the given list, according to the behaviour
of the function.
|
static final DuplicateRemovalFunction RETAIN_ALL
DuplicateRemovalFunction that does not remove duplicates.static final DuplicateRemovalFunction FIRST_ONLY
DuplicateRemovalFunction that retains only the first occurrence.static final DuplicateRemovalFunction LAST_ONLY
DuplicateRemovalFunction that retains only the last occurrence.<T> void processDuplicates(@NonNull List<T> list)
T - the type of entrieslist - the entries