Class Range

java.lang.Object
org.graalvm.tools.lsp.server.types.JSONBase
org.graalvm.tools.lsp.server.types.Range

public class Range extends JSONBase
A range in a text document expressed as (zero-based) start and end positions. If you want to specify a range that contains a line including the line ending character(s) then use an end position denoting the start of the next line. For example: ```ts { start: { line: 5, character: 23 } end : { line 6, character : 0 } } ```
  • Method Details

    • getStart

      public Position getStart()
      The range's start position.
    • setStart

      public Range setStart(Position start)
    • getEnd

      public Position getEnd()
      The range's end position.
    • setEnd

      public Range setEnd(Position end)
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • create

      public static Range create(Position start, Position end)
      Create a new Range liternal.
      Parameters:
      start - The range's start position.
      end - The range's end position.
    • create

      public static Range create(Integer startLine, Integer startCharacter, Integer endLine, Integer endCharacter)
      Create a new Range liternal.
      Parameters:
      startLine - The start line number.
      startCharacter - The start character.
      endLine - The end line number.
      endCharacter - The end character.
    • create

      public static Range create(Object one, Object two, Integer three, Integer four)