|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.x4juli.formatter.pattern.FormattingInfo
Modifies the output of a pattern converter for a specified minimum and maximum width and alignment.
Logging API as a whole was originally done for Apache log4j. Juli is a port of main parts of that to complete the Java Logging APIs. All credits for initial idea, design, implementation, documentation belong to the log4j crew. This file was originally published by Jim Cakalic, Ceki Gülcü, Curt Arnold. Please use exclusively the appropriate mailing lists for questions, remarks and contribution.
| Field Summary | |
private static FormattingInfo |
DEFAULT
Default instance. |
private boolean |
leftAlign
Alignment. |
private int |
maxLength
Maximum length. |
private int |
minLength
Minimum length. |
private static char[] |
SPACES
Array of spaces. |
| Constructor Summary | |
FormattingInfo(boolean leftAlign,
int minLength,
int maxLength)
Creates new instance. |
|
| Method Summary | |
void |
format(int fieldStart,
java.lang.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. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
private static final char[] SPACES
private static final FormattingInfo DEFAULT
private final int minLength
private final int maxLength
private final boolean leftAlign
| Constructor Detail |
public FormattingInfo(boolean leftAlign,
int minLength,
int maxLength)
leftAlign - left align if true.minLength - minimum length.maxLength - maximum length.| Method Detail |
public static FormattingInfo getDefault()
public boolean isLeftAligned()
public int getMinLength()
public int getMaxLength()
public final void format(int fieldStart,
java.lang.StringBuffer buffer)
fieldStart - start of field in buffer.buffer - buffer to be modified.public java.lang.String toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||