public final class

FormattingInfo

extends Object
java.lang.Object
   ↳ org.apache.log4j.pattern.FormattingInfo

Class Overview

Modifies the output of a pattern converter for a specified minimum and maximum width and alignment.

Summary

Public Constructors
FormattingInfo(boolean leftAlign, int minLength, int maxLength)
Creates new instance.
Public Methods
void format(int fieldStart, StringBuffer buffer)
Adjust the content of the buffer based on the specified lengths and alignment.
static FormattingInfo getDefault()
Gets default instance.
int getMaxLength()
Get maximum length.
int getMinLength()
Get minimum length.
boolean isLeftAligned()
Determine if left aligned.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public FormattingInfo (boolean leftAlign, int minLength, int maxLength)

Creates new instance.

Parameters
leftAlign left align if true.
minLength minimum length.
maxLength maximum length.

Public Methods

public void format (int fieldStart, StringBuffer 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.

public static FormattingInfo getDefault ()

Gets default instance.

Returns
  • default instance.

public int getMaxLength ()

Get maximum length.

Returns
  • maximum length.

public int getMinLength ()

Get minimum length.

Returns
  • minimum length.

public boolean isLeftAligned ()

Determine if left aligned.

Returns
  • true if left aligned.