Class Range


  • public class Range
    extends Object
    Represents the portions of source code taken up by a node within a file or snippet. Each range consists of a:
    • start byte offset
    • end byte offset
    • start point
    • end point
    Since:
    1.0.0
    Author:
    Ozren Dabić
    • Method Detail

      • builder

        public static Range.Builder builder()
        Obtain a new Range.Builder instance for constructing a range.
        Returns:
        a new range builder
      • toBuilder

        public Range.Builder toBuilder()
        Obtain a new Range.Builder initialized with the current range's attributes.
        Returns:
        a new range builder
        Since:
        1.12.0
      • toString

        public String toString()
        Returns a string representation of this range in the format:
        
              [startPoint] - [endPoint]
         
        Overrides:
        toString in class Object
        Returns:
        A string representation of this range