Class NameAbbreviator.MaxElementAbbreviator

  • Enclosing class:
    NameAbbreviator

    private static class NameAbbreviator.MaxElementAbbreviator
    extends NameAbbreviator
    Abbreviator that drops starting path elements.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int count
      Maximum number of path elements to output.
    • Constructor Summary

      Constructors 
      Constructor Description
      MaxElementAbbreviator​(int count)
      Create new instance.
    • Field Detail

      • count

        private final int count
        Maximum number of path elements to output.
    • Constructor Detail

      • MaxElementAbbreviator

        public MaxElementAbbreviator​(int count)
        Create new instance.
        Parameters:
        count - maximum number of path elements to output.
    • Method Detail

      • abbreviate

        public void abbreviate​(int nameStart,
                               java.lang.StringBuffer buf)
        Abbreviate name.
        Specified by:
        abbreviate in class NameAbbreviator
        Parameters:
        buf - buffer to append abbreviation.
        nameStart - start of name to abbreviate.