class Added implements DifferenceElement {

    private final CsmElement element;

    Added(CsmElement element) {
        this.element = element;
    }

    @Override
    public String toString() {
        return "Added{" + element + '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o)
            return true;
        if (o == null || getClass() != o.getClass())
            return false;
        Added added = (Added) o;
        return element.equals(added.element);
    }

    @Override
    public int hashCode() {
        return element.hashCode();
    }

    @Override
    public CsmElement getElement() {
        return element;
    }

    @Override
    public boolean isAdded() {
        return true;
    }

    @Override
    public boolean isRemoved() {
        return false;
    }

    @Override
    public boolean isKept() {
        return false;
    }

    public boolean isIndent() {
        return element instanceof CsmIndent;
    }

    public boolean isUnindent() {
        return element instanceof CsmUnindent;
    }

    private boolean isToken() {
        return element instanceof CsmToken;
    }

    public TextElement toTextElement() {<FILL_FUNCTION_BODY>}

    /*
     * If the {@code DifferenceElement} wraps an EOL token then this method returns a new wrapped {@code CsmElement}
     * with the specified line separator. The line separator parameter must be a CsmToken with a valid line separator.
     */
    @Override
    public DifferenceElement replaceEolTokens(CsmElement lineSeparator) {
        return isNewLine() ? new Added(lineSeparator) : this;
    }

    /*
     * Return true if the wrapped {@code CsmElement} is a new line token
     */
    public boolean isNewLine() {
        return isToken() && ((CsmToken) element).isNewLine();
    }
}

        if (element instanceof LexicalDifferenceCalculator.CsmChild) {
            return new ChildTextElement(((LexicalDifferenceCalculator.CsmChild) element).getChild());
        }
            if (element instanceof CsmToken) {
            return new TokenTextElement(((CsmToken) element).getTokenType(), ((CsmToken) element).getContent());
        }
        throw new UnsupportedOperationException("Unsupported element type: " + element.getClass().getSimpleName());
    
<no_super_class>