- java.lang.Object
-
- io.github.mmm.base.justification.JustificationImpl
-
- All Implemented Interfaces:
Justification
public class JustificationImpl extends Object implements Justification
Implementation of aJustification
.
-
-
Constructor Summary
Constructors Constructor Description JustificationImpl(String format)
The constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
justify(CharSequence value)
This method applies the justification to the givenvalue
and returns the result.void
justify(CharSequence value, Appendable target)
This method applies the justification to the givenvalue
andappends
the result to the giventarget
.String
toString()
-
-
-
Constructor Detail
-
JustificationImpl
public JustificationImpl(String format)
The constructor.- Parameters:
format
- is the justification-format.
-
-
Method Detail
-
justify
public String justify(CharSequence value)
Description copied from interface:Justification
This method applies the justification to the givenvalue
and returns the result.- Specified by:
justify
in interfaceJustification
- Parameters:
value
- is the string to justify.- Returns:
- the justified string.
-
justify
public void justify(CharSequence value, Appendable target)
Description copied from interface:Justification
This method applies the justification to the givenvalue
andappends
the result to the giventarget
.- Specified by:
justify
in interfaceJustification
- Parameters:
value
- is the string to justify.target
- is where toappend
the justified data.
-
-