Skip to content

Conversation

@nevans
Copy link
Collaborator

@nevans nevans commented Jan 24, 2025

Adds three new SequenceSet methods for querying about "duplicates":

  • #has_duplicates?: Returns whether the ordered entries contain any duplicates.
  • #count_duplicates: Returns the count of duplicates in the ordered entries.
  • #count_with_duplicates: Returns the count of numbers in the ordered entries, including any repeated numbers.

This splits off "normalized" vs "order preserving" methods in the
"What's here?" sections.
Adds three new SequenceSet methods for querying about "duplicates":
* `#has_duplicates?`: Returns whether the ordered entries contain any
  duplicates.
* `#count_duplicates`: Returns the count of duplicates in the ordered
  entries.
* `#count_with_duplicates`: Returns the count of numbers in the ordered
  entries, including any repeated numbers.

This is useful for adding guards to `CopyUIDData` and `UIDPlusData`, and
for getting the size of `SequenceSet#each_ordered_number` (another PR).
@nevans nevans merged commit a9e1ce9 into master Jan 24, 2025
37 checks passed
@nevans nevans deleted the sequence-set-ordered-duplicates-methods branch January 24, 2025 22:51
@nevans nevans added the enhancement New feature or request label Jan 24, 2025
@nevans nevans added the sequence-set Any code the IMAP `sequence-set` data type or grammar rule, especially the SequenceSet class. label Dec 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request sequence-set Any code the IMAP `sequence-set` data type or grammar rule, especially the SequenceSet class.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants