Skip to content

Commit

Permalink
(yegor256#1462) Use text.Mapped
Browse files Browse the repository at this point in the history
  • Loading branch information
andreoss committed Oct 16, 2020
1 parent 8996680 commit d6513dd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main/java/org/cactoos/text/Trimmed.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
/**
* Text without control characters (char <= 32) from both ends.
*
* <p>There is no thread-safety guarantee.
* <p>
* There is no thread-safety guarantee.
*
* @since 0.1
*/
Expand All @@ -39,6 +40,6 @@ public final class Trimmed extends TextEnvelope {
* @param text The text
*/
public Trimmed(final Text text) {
super(new TextOf(() -> text.asString().trim()));
super(new Mapped(str -> str.trim(), text));
}
}

0 comments on commit d6513dd

Please sign in to comment.