Class Range

    • Constructor Detail

      • Range

        private Range()
    • Method Detail

      • contains

        public boolean contains​(int n)
        Binary search over ordered segments.
        Parameters:
        n - numeric character reference based on the character's Unicode code point
        Returns:
        true if this Range contains the specified code point, otherwise false
      • equals

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

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

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • normalizeSubRanges

        private static Range.SubRange[] normalizeSubRanges​(java.util.List<Range.SubRange> ranges)
        Order ranges. Replace with a union of ranges in case of overlap.
        Parameters:
        ranges - Unsorted list of sub-ranges.
        Returns:
        ordered and normalized sub-ranges.