Package aQute.lib.justif
Class Justif
- java.lang.Object
-
- aQute.lib.justif.Justif
-
public class Justif extends java.lang.Object
Formatter. This formatter allows you to build up an input string and then wraps the text. The following markup is available- $- - Line over the remaining width
- \\t[0-9] - Go to tab position, and set indent to that position
- \\f - Newlin
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
entry(java.lang.String key, java.lang.String separator, java.lang.Object value)
java.util.Formatter
formatter()
void
indent(int indent, java.lang.String string)
void
table(java.util.Map<java.lang.String,java.lang.Object> table, java.lang.String separator)
java.lang.String
toString()
java.lang.String
toString(java.lang.Object o)
java.lang.String
wrap()
void
wrap(java.lang.StringBuilder sb)
Routine to wrap a stringbuffer.
-
-
-
Method Detail
-
wrap
public void wrap(java.lang.StringBuilder sb)
Routine to wrap a stringbuffer. Basically adds line endings but has the following control characters:- Space at the beginnng of a line is repeated when wrapped for indent.
- A tab will mark the current position and wrapping will return to that position
- A form feed in a tabbed colum will break but stay in the column
- Parameters:
sb
-
-
wrap
public java.lang.String wrap()
-
formatter
public java.util.Formatter formatter()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
indent
public void indent(int indent, java.lang.String string)
-
entry
public void entry(java.lang.String key, java.lang.String separator, java.lang.Object value)
-
table
public void table(java.util.Map<java.lang.String,java.lang.Object> table, java.lang.String separator)
-
toString
public java.lang.String toString(java.lang.Object o)
-
-