Interface FormatterFunc

All Known Subinterfaces:
FormatterFunc.Closeable, FormatterFunc.NeedsFile
All Known Implementing Classes:
RdfFormatterFunc
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface FormatterFunc
A Function<String, String> which can throw an exception. Technically, there is also a File argument which gets passed around as well, but that is invisible to formatters. If you need the File, see FormatterFunc.NeedsFile.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
    Function<String, String> and BiFunction<String, File, String> whose implementation requires a resource which should be released when the function is no longer needed.
    static interface 
     
  • Method Summary

    Modifier and Type
    Method
    Description
    apply(String input)
     
    default String
    apply(String unix, File file)
     
    default List<Lint>
    lint(String content, File file)
    Calculates a list of lints against the given content.
    Ideally, formatters don't need the underlying file.