Class SourceContextLoader.Line

  • Enclosing interface:
    SourceContextLoader

    public static final class SourceContextLoader.Line
    extends java.lang.Object
    A pair of line numbers to the contents of lines.
    • Constructor Summary

      Constructors 
      Constructor Description
      Line​(int lineNumber, java.lang.CharSequence content)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)  
      java.lang.CharSequence getContent()
      Returns the content as a CharSequence.
      int getLineNumber()
      Get the line number of the line, starting at 1.
      int hashCode()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Line

        public Line​(int lineNumber,
                    java.lang.CharSequence content)
    • Method Detail

      • getLineNumber

        public int getLineNumber()
        Get the line number of the line, starting at 1.
        Returns:
        Returns the 1-based line number.
      • getContent

        public java.lang.CharSequence getContent()
        Returns the content as a CharSequence.

        CharSequence is used here to allow implementations to potentially use things like CharBuffer slices.

        Returns:
        The content of the line.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object