|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.mmm.util.text.base.JustificationImpl
public class JustificationImpl
This is the implementation of a Justification.
| Field Summary | |
|---|---|
private HorizontalAlignment |
alignment
The alignment. |
private char |
filler
The character used to fill up. |
private static String |
FORMAT_PATTERN
The pattern for the format. |
private char |
mode
The mode of the Justification. |
private static char |
MODE_DEFAULT
The character used to identify the default mode. |
private static char |
MODE_TRUNCATE
The character used to identify the truncate mode. |
private int |
width
The width of the justified string. |
| Constructor Summary | |
|---|---|
JustificationImpl(String format)
The constructor. |
|
| Method Summary | |
|---|---|
String |
justify(CharSequence value)
This method applies the justification to the given value and
returns the result. |
void |
justify(CharSequence value,
Appendable target)
This method applies the justification to the given value and
appends the result to the given
target. |
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 MODE_TRUNCATE
private static final char MODE_DEFAULT
private static final String FORMAT_PATTERN
private final HorizontalAlignment alignment
private final char filler
private final int width
private final char mode
Justification.
| Constructor Detail |
|---|
public JustificationImpl(String format)
format - is the justification-format.| Method Detail |
|---|
public String justify(CharSequence value)
value and
returns the result.
justify in interface Justificationvalue - is the string to justify.
public void justify(CharSequence value,
Appendable target)
throws IOException
value and
appends the result to the given
target.
justify in interface Justificationvalue - is the string to justify.target - is where to append
the justified data.
IOException - if caused by Appendable.append(CharSequence).public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||