Interface LineNumberFormatter

All Known Implementing Classes:
LineNumberList.SimpleLineNumberFormatter

public interface LineNumberFormatter
Formats line numbers into a comprehensible String to be displayed to the user.
  • Method Summary

    Modifier and Type
    Method
    Description
    format(int lineNumber)
    Formats the given line number into a String.
    int
    getMaxLength(int maxLineNumber)
    Returns the maximum number of characters of any string returned by format(int) provided a certain maximum line number.
  • Method Details

    • format

      String format(int lineNumber)
      Formats the given line number into a String.
      Parameters:
      lineNumber - the line number
      Returns:
      the formatted line number
    • getMaxLength

      int getMaxLength(int maxLineNumber)
      Returns the maximum number of characters of any string returned by format(int) provided a certain maximum line number.
      Parameters:
      maxLineNumber - the maximum line number
      Returns:
      the maximum length