Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limited joining collector #16

Closed
19 tasks done
amaembo opened this issue Oct 30, 2015 · 0 comments
Closed
19 tasks done

Limited joining collector #16

amaembo opened this issue Oct 30, 2015 · 0 comments
Milestone

Comments

@amaembo
Copy link
Owner

amaembo commented Oct 30, 2015

Implement collector which joins stream of CharSequences with given delimiter which may short-circuit when the given length is reached adding the optional ellipsis. Possible features and settings include:

  • delimiter CharSequence
  • prefix/suffix CharSequences (to fully supercede the JDK Collectors.joining)
  • ellipsis CharSequence (default: "...")
  • Limit length:
    • by number of chars
    • by number of codepoints
    • by number of Unicode symbols (including combining ones)
    • by custom user function (which probably computes the rendered string width in the UI) (postponed: see Enhance Joining collector #20)
  • Where to cut the string:
    • between any chars
    • between any codepoints
    • between any Unicode symbols (see java.text.BreakIterator.getCharacterInstance())
    • between any words (see java.text.BreakIterator.getWordInstance())
    • only before delimiter: "foo, bar..."
    • only after delimiter: "foo, bar, ..."
    • with custom user function (probably using ICU4J BreakIterator, etc.) (postponed: see Enhance Joining collector #20)

Roadmap:

  • Implementation draft
  • Tests
  • JavaDoc
  • Benchmarks
  • Changes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant