Module bus.setting

Class PropertyFormatter

java.lang.Object
org.miaixz.bus.setting.format.AbstractFormatter<IniProperty>
org.miaixz.bus.setting.format.PropertyFormatter
All Implemented Interfaces:
ElementFormatter<IniProperty>

public class PropertyFormatter extends AbstractFormatter<IniProperty>
将字符串值格式设置为IniProperty
Since:
Java 17+
Author:
Kimi Liu
  • Constructor Details

    • PropertyFormatter

      public PropertyFormatter(CommentFormatter commentElementFormatter)
    • PropertyFormatter

      public PropertyFormatter()
    • PropertyFormatter

      public PropertyFormatter(char split, CommentFormatter commentElementFormatter)
    • PropertyFormatter

      public PropertyFormatter(char split)
  • Method Details

    • check

      public boolean check(String value)
      Description copied from interface: ElementFormatter
      check this value.
      Parameters:
      value - value
      Returns:
      true if can.
    • format

      public IniProperty format(String value, int line)
      此方法不会检查值,因此您应该首先check(String) 但是,不检查并不一定会报告错误,但可能会导致违规
      Parameters:
      value - a String value
      line - line number
      Returns:
      IniProperty, can not be null.