Class NameAbbreviator.MaxElementAbbreviator

  • Enclosing class:
    NameAbbreviator

    private static class NameAbbreviator.MaxElementAbbreviator
    extends NameAbbreviator
    Abbreviator that drops starting path elements.
    • Constructor Detail

      • MaxElementAbbreviator

        public MaxElementAbbreviator​(int count,
                                     NameAbbreviator.MaxElementAbbreviator.Strategy strategy)
        Create new instance.
        Parameters:
        count - maximum number of path elements to drop or output.
        strategy - drop or retain
    • Method Detail

      • abbreviate

        public void abbreviate​(java.lang.String original,
                               java.lang.StringBuilder destination)
        Abbreviate name.
        Specified by:
        abbreviate in class NameAbbreviator
        Parameters:
        original - The String to abbreviate.
        destination - the buffer to write the abbreviated name into