Class SourceContextLoader.Line

java.lang.Object
software.amazon.smithy.model.loader.sourcecontext.SourceContextLoader.Line
Enclosing interface:
SourceContextLoader

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

  • Method Details

    • getLineNumber

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

      public 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 Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object