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

javax0.jamal.asciidoc.converters.AbstractConverter Maven / Gradle / Ivy

There is a newer version: 2.8.2
Show newest version
package javax0.jamal.asciidoc.converters;

import javax0.jamal.asciidoc.Converter;

import java.util.List;

public abstract class AbstractConverter implements Converter {

    /**
     * Return the file extensions that the concrete class can handle. The elementd do not inlclude the "." before the
     * extension and the trailing ".jam".
     *
     * @return the list of extensions the concrete implementation can handle.
     */
    abstract List extensions();

    @Override
    public boolean canConvert(final String fileName) {
        for (final var extension : extensions()) {
            if (fileName.endsWith("." + extension + ".jam")) {
                return true;
            }
        }
        return false;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy