Class EqualsBaseReplacementConverter

All Implemented Interfaces:
PatternConverter
Direct Known Subclasses:
EqualsIgnoreCaseReplacementConverter, EqualsReplacementConverter

public abstract class EqualsBaseReplacementConverter extends LogEventPatternConverter
Equals pattern converter.
  • Constructor Details

    • EqualsBaseReplacementConverter

      protected EqualsBaseReplacementConverter(String name, String style, List<PatternFormatter> formatters, String testString, String substitution, PatternParser parser)
      Construct the converter.
      Parameters:
      name - converter name
      style - converter style
      formatters - The PatternFormatters to generate the text to manipulate.
      testString - The test string.
      substitution - The substitution string.
      parser - The PatternParser.
  • Method Details

    • format

      public void format(LogEvent event, StringBuilder toAppendTo)
      Formats an event into a string buffer.
      Specified by:
      format in class LogEventPatternConverter
      Parameters:
      event - event to format, may not be null.
      toAppendTo - string buffer to which the formatted event will be appended. May not be null.
    • equals

      protected abstract boolean equals(String str, StringBuilder buff, int from, int len)
      Returns true if the specified String equals the specified section of the specified StringBuilder.
      Parameters:
      str - the String to compare
      buff - the StringBuilder to compare a section of
      from - start index in the StringBuilder
      len - length of the section in the StringBuilder
      Returns:
      true if equal, false otherwise