Package net.luckperms.api.metastacking
Interface DuplicateRemovalFunction
-
public interface DuplicateRemovalFunctionFunctional interface which removes duplicate entries from a list.Used by LuckPerms to remove duplicate entries from a MetaStack.
-
-
Field Summary
Fields Modifier and Type Field Description static DuplicateRemovalFunctionFIRST_ONLYADuplicateRemovalFunctionthat retains only the first occurrence.static DuplicateRemovalFunctionLAST_ONLYADuplicateRemovalFunctionthat retains only the last occurrence.static DuplicateRemovalFunctionRETAIN_ALLADuplicateRemovalFunctionthat does not remove duplicates.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <T> voidprocessDuplicates(@NonNull List<T> list)Removes duplicates from the given list, according to the behaviour of the function.
-
-
-
Field Detail
-
RETAIN_ALL
static final DuplicateRemovalFunction RETAIN_ALL
ADuplicateRemovalFunctionthat does not remove duplicates.
-
FIRST_ONLY
static final DuplicateRemovalFunction FIRST_ONLY
ADuplicateRemovalFunctionthat retains only the first occurrence.
-
LAST_ONLY
static final DuplicateRemovalFunction LAST_ONLY
ADuplicateRemovalFunctionthat retains only the last occurrence.
-
-