Skip to content

Commit

Permalink
Making SingleNewlineInTextWrapper a proper singleton
Browse files Browse the repository at this point in the history
  • Loading branch information
Björn Ekryd committed Jul 24, 2023
1 parent b4da3ee commit 773123d
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,12 @@
import org.dom4j.Text;

/**
* A wrapper that contains a single newline, that will be thrown away.
* A singleton wrapper that contains a single newline. The content will be thrown away.
*
* @author Bjorn
*/
public final class SingleNewlineInTextWrapper implements Wrapper<Node> {
public static final SingleNewlineInTextWrapper INSTANCE = new SingleNewlineInTextWrapper();

/** Instantiates a new wrapper, whose content will be thrown away. */
private SingleNewlineInTextWrapper() {}
public enum SingleNewlineInTextWrapper implements Wrapper<Node> {
INSTANCE;

@Override
public Text getContent() {
Expand Down

0 comments on commit 773123d

Please sign in to comment.