- All Superinterfaces:
AutoCloseable,Closeable
- All Known Implementing Classes:
DefaultFormatter
An interface for an INI file line formatter. It is responsible for parsing a single line into a corresponding
IniElement.- Since:
- Java 17+
- Author:
- Kimi Liu
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidclose()Closes the formatter and resets its state by callinginit().formatLine(String line) Formats a raw line from an INI file into anIniElement.voidinit()Resets the formatter to its initial state.
-
Method Details
-
formatLine
Formats a raw line from an INI file into anIniElement.- Parameters:
line- The line string to format.- Returns:
- The parsed
IniElement, or null if the line should be ignored (e.g., an empty line).
-
init
void init()Resets the formatter to its initial state. This is useful when reusing the formatter to parse a new file. -
close
default void close()Closes the formatter and resets its state by callinginit().- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-