Module bus.setting
Package org.miaixz.bus.setting.format
Interface ElementFormatter<E extends IniElement>
- Type Parameters:
E- The type ofIniElementthis formatter produces.
- All Known Implementing Classes:
AbstractFormatter,CommentFormatter,PropertyFormatter,SectionFormatter
public interface ElementFormatter<E extends IniElement>
An interface for formatters that convert a string value from a configuration file into a specific
IniElement
type.- Since:
- Java 17+
- Author:
- Kimi Liu
-
Method Summary
-
Method Details
-
check
Checks if this formatter can handle the given string value.- Parameters:
value- The string value to check.- Returns:
trueif this formatter can process the value,falseotherwise.
-
format
Formats the string value into an element of typeE. This method assumes thatcheck(String)has already returned true for the given value.- Parameters:
value- A string value that this formatter can handle.line- The line number where the value originated.- Returns:
- The formatted
IniElement, which should not be null.
-