Simple utility class for writing indented text. It uses two properties, a
unit
and a
level
, and produces an indentation by appending the
unit
level
number of times.
An Indentation
is initially created through one of its constructors. The resulting instance has level 0, meaning it will not produce any indentation. New instances can be created from an existing Indentation
through the {@link #increase()} and {@link #decrease()}methods. This allows the Indentation
class to be easily used in a scenario where a structure is traversed recursively, producing output.
@author Torgil Zethson
@since 4.1.0