Class FieldRange

  • All Implemented Interfaces:
    java.lang.Comparable<FieldRange>

    public class FieldRange
    extends java.lang.Object
    implements java.lang.Comparable<FieldRange>
    Class to a range consisting of a start position within a start row to an end position within an end row (exclusive).

    Conceptually, this class can be thought of as a range of rows (defined by startIndex and endindex) with sub-positions within those rows (defined by startField and endField). As an example, consider a text select that begins on some word in a row and ends on another word in a different row.

    • Constructor Detail

      • FieldRange

        public FieldRange​(FieldRange range)
      • FieldRange

        public FieldRange​(org.jdom.Element element)
    • Method Detail

      • getElement

        public org.jdom.Element getElement()
      • toString

        public java.lang.String toString()
        Return string representation for debugging purposes.
        Overrides:
        toString in class java.lang.Object
      • contains

        public boolean contains​(FieldLocation loc)
        checks if the given location is contained in the range.
        Parameters:
        row -
        column -
        Returns:
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • compareTo

        public int compareTo​(FieldRange o)
        Specified by:
        compareTo in interface java.lang.Comparable<FieldRange>
      • canMerge

        public boolean canMerge​(FieldRange newRange)
      • merge

        public void merge​(FieldRange newRange)
      • isEmpty

        public boolean isEmpty()
      • intersects

        public boolean intersects​(FieldRange range)
      • containsEntirely

        public boolean containsEntirely​(int index)
      • containsEntirely

        public boolean containsEntirely​(java.math.BigInteger index)