public class NoSpaceBetweenAbbreviations extends java.lang.Object implements LayoutFormatter
LayoutFormatter that removes the space between abbreviated First names
What out that this regular expression might also remove other spaces that fit the pattern.
Example: J. R. R. Tolkien becomes J.R.R. Tolkien.
See Testcase for more examples.
Constructor and Description |
---|
NoSpaceBetweenAbbreviations() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
format(java.lang.String fieldText)
Failure Mode:
|
public java.lang.String format(java.lang.String fieldText)
LayoutFormatter
Formatters should be robust in the sense that they always return some relevant string.
If the formatter can detect an invalid input it should return the original string otherwise it may simply return a wrong output.
format
in interface LayoutFormatter
fieldText
- The text to layout.