Class SectionFormatter

java.lang.Object
org.aoju.bus.setting.format.AbstractFormatter<IniSection>
org.aoju.bus.setting.format.SectionFormatter
All Implemented Interfaces:
ElementFormatter<IniSection>

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

    • SectionFormatter

      public SectionFormatter(CommentFormatter commentElementFormatter)
    • SectionFormatter

      public SectionFormatter()
    • SectionFormatter

      public SectionFormatter(char head, char end, CommentFormatter commentElementFormatter)
    • SectionFormatter

      public SectionFormatter(char head, char end)
  • Method Details

    • check

      public boolean check(String value)
      check this value. if this value's first char == HEAD value, pass.
      Parameters:
      value - value
      Returns:
      true if can.
    • format

      public IniSection format(String value, int line)
      this method will not check value, so you should check(String) first. However, not checking will not necessarily report an error, but may result in non-compliance.
      Parameters:
      value - a String value
      line - line number
      Returns:
      IniSection, can not be null.