Class Line

  • All Implemented Interfaces:
    IRegion

    final class Line
    extends java.lang.Object
    implements IRegion
    Describes a line as a particular number of characters beginning at a particular offset, consisting of a particular number of characters, and being closed with a particular line delimiter.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      java.lang.String delimiter
      The delimiter of this line
      int length
      The length of the line
      int offset
      The offset of the line
    • Constructor Summary

      Constructors 
      Constructor Description
      Line​(int offset, int length)
      Creates a new Line.
      Line​(int offset, int end, java.lang.String delimiter)
      Creates a new Line.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getLength()  
      int getOffset()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • offset

        public int offset
        The offset of the line
      • length

        public int length
        The length of the line
      • delimiter

        public final java.lang.String delimiter
        The delimiter of this line
    • Constructor Detail

      • Line

        public Line​(int offset,
                    int end,
                    java.lang.String delimiter)
        Creates a new Line.
        Parameters:
        offset - the offset of the line
        end - the last including character offset of the line
        delimiter - the line's delimiter
      • Line

        public Line​(int offset,
                    int length)
        Creates a new Line.
        Parameters:
        offset - the offset of the line
        length - the length of the line
    • Method Detail

      • getOffset

        public int getOffset()
        Specified by:
        getOffset in interface IRegion
      • getLength

        public int getLength()
        Specified by:
        getLength in interface IRegion