private static class NameAbbreviator.PatternAbbreviatorFragment extends Object
Modifier and Type | Field and Description |
---|---|
private int |
charCount
Count of initial characters of element to output.
|
private char |
ellipsis
Character used to represent dropped characters.
'\0' indicates no representation of dropped characters.
|
Constructor and Description |
---|
PatternAbbreviatorFragment(int charCount,
char ellipsis)
Creates a PatternAbbreviatorFragment.
|
Modifier and Type | Method and Description |
---|---|
int |
abbreviate(StringBuffer buf,
int startPos)
Abbreviate element of name.
|
private final int charCount
private final char ellipsis
public PatternAbbreviatorFragment(int charCount, char ellipsis)
charCount
- number of initial characters to preserve.ellipsis
- character to represent elimination of characters,
'\0' if no ellipsis is desired.public int abbreviate(StringBuffer buf, int startPos)
buf
- buffer to receive element.startPos
- starting index of name element.WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses