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 f7cbbd6 commit 637ecf4
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/main/java/org/cactoos/text/Reversed.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,9 @@ public final class Reversed extends TextEnvelope {
*/
public Reversed(final Text text) {
super(
new TextOf(
() -> new StringBuilder(
text.asString()
).reverse().toString()
new Mapped(
string -> new StringBuilder(string).reverse().toString(),
text
)
);
}
Expand Down

0 comments on commit 637ecf4

Please sign in to comment.