All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cdc.applic.publication.ExpressionFormatter Maven / Gradle / Ivy

The newest version!
package cdc.applic.publication;

import cdc.applic.expressions.Expression;

@FunctionalInterface
public interface ExpressionFormatter {
    /**
     * Format an {@link Expression}, if possible.
     *
     * @param expression The expression to format.
     * @param handler The handler.
     */
    public void format(Expression expression,
                       FormattingHandler handler);

    public default String formatAsString(Expression expression) {
        final StringFormattingHandler handler = new StringFormattingHandler();
        format(expression, handler);
        return handler.toString();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy