org.apache.log4j.pattern
Class FormattingInfo
java.lang.Object
|
+--org.apache.log4j.pattern.FormattingInfo
- public final class FormattingInfo
- extends Object
Modifies the output of a pattern converter for a specified minimum
and maximum width and alignment.
- Since:
- 1.3
- Author:
- Jim Cakalic, Ceki Gülcü, Curt Arnold
Constructor Summary |
FormattingInfo(boolean leftAlign,
int minLength,
int maxLength)
Creates new instance. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FormattingInfo
public FormattingInfo(boolean leftAlign,
int minLength,
int maxLength)
- Creates new instance.
- Parameters:
leftAlign
- left align if true.minLength
- minimum length.maxLength
- maximum length.
getDefault
public static FormattingInfo getDefault()
- Gets default instance.
- Returns:
- default instance.
isLeftAligned
public boolean isLeftAligned()
- Determine if left aligned.
- Returns:
- true if left aligned.
getMinLength
public int getMinLength()
- Get minimum length.
- Returns:
- minimum length.
getMaxLength
public int getMaxLength()
- Get maximum length.
- Returns:
- maximum length.
format
public final 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.
Copyright © 2000-2006 Apache Software Foundation.
Licensed under the Apache License, Version 2.0.