DuplicatesList<T> extension

on

Properties

containsDuplicates bool

Available on List<T>, provided by the DuplicatesList extension

Returns true if the iterable contains any duplicate elements. Example usage:
no setter
duplicates List<T>

Available on List<T>, provided by the DuplicatesList extension

Returns a new list containing only the duplicate elements from this list. Note that if an element is duplicated multiple times, it will appear multiple times in the result.
no setter
numberOfDuplicates int

Available on List<T>, provided by the DuplicatesList extension

Returns the number of duplicate elements in the iterable. Note that this does not count the unique elements that are duplicated, but the total number of duplicates.
no setter
uniques List<T>

Available on List<T>, provided by the DuplicatesList extension

Returns a new list containing only the unique elements from this list. Example usage:
no setter

Methods

addAllByAvoidingDuplicates(Iterable<T> values) → void

Available on List<T>, provided by the DuplicatesList extension

Adds all elements from values to this list, avoiding duplicates.
removeDuplicates() → void

Available on List<T>, provided by the DuplicatesList extension

Removes duplicate elements from the list in place.