Class SourceContextLoader.Line
- java.lang.Object
-
- software.amazon.smithy.model.loader.sourcecontext.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()
-
-
-
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 classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-