private static class NameAbbreviator.MaxElementAbbreviator extends NameAbbreviator
| Modifier and Type | Class and Description |
|---|---|
private static class |
NameAbbreviator.MaxElementAbbreviator.Strategy
When the name is reduced in length by cutting parts, there can be two ways to do it.
|
| Modifier and Type | Field and Description |
|---|---|
private int |
count
Maximum number of path elements to output.
|
private NameAbbreviator.MaxElementAbbreviator.Strategy |
strategy
Strategy used for cutting down the size of the name
|
| Constructor and Description |
|---|
MaxElementAbbreviator(int count,
NameAbbreviator.MaxElementAbbreviator.Strategy strategy)
Create new instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
abbreviate(java.lang.String original,
java.lang.StringBuilder destination)
Abbreviate name.
|
getAbbreviator, getDefaultAbbreviatorprivate final int count
private final NameAbbreviator.MaxElementAbbreviator.Strategy strategy
public MaxElementAbbreviator(int count,
NameAbbreviator.MaxElementAbbreviator.Strategy strategy)
count - maximum number of path elements to drop or output.strategy - drop or retainpublic void abbreviate(java.lang.String original,
java.lang.StringBuilder destination)
abbreviate in class NameAbbreviatororiginal - The String to abbreviate.destination - the buffer to write the abbreviated name into