类 Span

java.lang.Object
org.ssssssss.script.parsing.Span

public class Span extends Object
A span within a source string denoted by start and end index, with the latter being exclusive.
  • 构造器详细资料

    • Span

      public Span(String source)
    • Span

      public Span(String source, int start, int end)
    • Span

      public Span(Span start, Span end)
  • 方法详细资料

    • getText

      public String getText()
      Returns the text referenced by this span
    • getStart

      public int getStart()
      Returns the index of the first character of this span.
    • getEnd

      public int getEnd()
      Returns the index of the last character of this span plus 1.
    • getSource

      public String getSource()
      Returns the source string this span references.
    • toString

      public String toString()
      覆盖:
      toString 在类中 Object
    • getLine

      public Span.Line getLine()
      Returns the line this span is on. Does not return a correct result for spans across multiple lines.
    • equals

      public boolean equals(Object o)
      覆盖:
      equals 在类中 Object
    • hashCode

      public int hashCode()
      覆盖:
      hashCode 在类中 Object