Created
April 24, 2018 21:31
-
-
Save zahlenteufel/29d2e0094bac2ef8c6d8efced23455ba to your computer and use it in GitHub Desktop.
Java SafeHtml collector
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class xxx { | |
Collector<SafeHtml, SafeHtmlBuilder, SafeHtml> safeHtmlCollector = | |
Collector.of( | |
SafeHtmlBuilder::new, | |
(BiConsumer<SafeHtmlBuilder, SafeHtml>) SafeHtmlBuilder::append, | |
(builder1, builder2) -> builder1.append(builder2.toSafeHtml()), | |
SafeHtmlBuilder::toSafeHtml); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment