Class Log4jPatternParser.FormattingInfo

java.lang.Object
com.logviewer.logLibs.log4j.Log4jPatternParser.FormattingInfo
Enclosing class:
Log4jPatternParser

public static class Log4jPatternParser.FormattingInfo extends Object
  • Constructor Details

    • FormattingInfo

      public FormattingInfo(boolean leftAlign, int minLength, int maxLength, boolean leftTruncate)
      Creates new instance.
      Parameters:
      leftAlign - left align if true.
      minLength - minimum length.
      maxLength - maximum length.
      leftTruncate - truncates to the left if true
    • FormattingInfo

      public FormattingInfo(boolean leftAlign, int minLength, int maxLength, boolean leftTruncate, boolean zeroPad)
      Creates new instance.
      Parameters:
      leftAlign - left align if true.
      minLength - minimum length.
      maxLength - maximum length.
      leftTruncate - truncates to the left if true
      zeroPad - use zero-padding instead of whitespace-padding
  • Method Details

    • getDefault

      public static Log4jPatternParser.FormattingInfo getDefault()
      Gets default instance.
      Returns:
      default instance.
    • isLeftAligned

      public boolean isLeftAligned()
      Determine if left aligned.
      Returns:
      true if left aligned.
    • isLeftTruncate

      public boolean isLeftTruncate()
      Determine if left truncated.
      Returns:
      true if left truncated.
    • isZeroPad

      public boolean isZeroPad()
      Determine if zero-padded.
      Returns:
      true if zero-padded.
    • getMinLength

      public int getMinLength()
      Get minimum length.
      Returns:
      minimum length.
    • getMaxLength

      public int getMaxLength()
      Get maximum length.
      Returns:
      maximum length.
    • format

      public void format(int fieldStart, StringBuilder buffer)
      Adjust the content of the buffer based on the specified lengths and alignment.
      Parameters:
      fieldStart - start of field in buffer.
      buffer - buffer to be modified.
    • toString

      public String toString()
      Returns a String suitable for debugging.
      Overrides:
      toString in class Object
      Returns:
      a String suitable for debugging.