Package eu.bandm.tools.format
Class Space
java.lang.Object
eu.bandm.tools.format.Format
eu.bandm.tools.format.Space
- All Implemented Interfaces:
Formattable,Serializable,Cloneable
Causes horizontal space (of variable width) when in the middle of a line,
or one single blank line (independent of its width) when in vertical
stack.
Does not print horizontally at a start of a linee --- for this
there is
indent(int).- See Also:
-
Field Summary
Fields inherited from class eu.bandm.tools.format.Format
comma, DEFAULT_WIDTH, dot, empty, indent, INDENT_NOT_SET, LENGTH_PREFIX, space -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondebugPrefix(int n) Deliver the concatenation of the text contents, limited by the given number of characters, approximately.protected voidOver-ridden by all sub-classes of Format, for performing the print operations.indent(int i) Returns a clone ofthiswith the new value ofFormat.indent.protected booleanisSpace()Whether this format is a space.Methods inherited from class eu.bandm.tools.format.Format
annotated, append, append, apply, apply, apply, apply, applyPartial, applyTo, applyTo, beneath, beneath, beside, beside, block, block, checkValidIndent, comment, comment, comment, comment, eval, format, getIndent, ground, indentIsSet, isAlwaysMultiline, line, line, literal, markup, markupLeft, markupRight, maxOfMins, maxWidth, minWidth, of, printFormat, printFormat, printNonFormat, prior, prior, properties, server, showLn, space, subst, subst, subst, tabular, tabular, toObjString, toString, toString, variable, variable
-
Constructor Details
-
Space
protected Space(int i) Create a space format of the given width and unspecified indentation.- Parameters:
i- the width of the format. Must be greater than zero.- Throws:
IllegalArgumentException- if the given width is smaller than one.
-
Space
protected Space(int i, int indent) Create a space format of the given width and indentation.- Parameters:
i- the width of the format. Must be greater than zero.indent- the indentation of this format- Throws:
IllegalArgumentException- if the given width is smaller than one.IllegalArgumentException- if ident value not valid, seeFormat.checkValidIndent(int)
-
-
Method Details
-
isSpace
protected boolean isSpace()Description copied from class:FormatWhether this format is a space. -
indent
Description copied from class:FormatReturns a clone ofthiswith the new value ofFormat.indent. -
doprint
Description copied from class:FormatOver-ridden by all sub-classes of Format, for performing the print operations. -
debugPrefix
Description copied from class:FormatDeliver the concatenation of the text contents, limited by the given number of characters, approximately. Useful for debugging purpose.- Specified by:
debugPrefixin classFormat- Parameters:
n- the maximal number of characters which can be generated per tree node.- Returns:
- the concatenated, unformatted text contents.
-