Class ToUnicodeInterval


  • public class ToUnicodeInterval
    extends Object
    Represents interval of mappings to Unicode.
    Author:
    Sergey Shemyakov
    • Constructor Detail

      • ToUnicodeInterval

        public ToUnicodeInterval​(long intervalBegin,
                                 long intervalEnd,
                                 byte[] startingValue)
        Parameters:
        intervalBegin - is the first code of mapping interval.
        intervalEnd - is the last code of mapping interval.
        startingValue - is the cid value for first code of mapping interval.
    • Method Detail

      • containsCode

        public boolean containsCode​(long code)
        Checks if given code can be successfully mapped to cid with this mapping interval.
        Parameters:
        code - is character code to be checked.
        Returns:
        mapping for code is present in this mapping interval.
      • toUnicode

        public String toUnicode​(int code)
        If code is in mapping interval, this method performs mapping of given code to Unicode value. If code is not in interval, return value is undefined.
        Parameters:
        code - is a character code.
        Returns:
        Unicode value for character code as a String object.