Class ToUnicodeInterval

java.lang.Object
org.verapdf.pd.font.cmap.ToUnicodeInterval

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

    Constructors
    Constructor
    Description
    ToUnicodeInterval(long intervalBegin, long intervalEnd, byte[] startingValue)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    containsCode(long code)
    Checks if given code can be successfully mapped to cid with this mapping interval.
    toUnicode(int code)
    If code is in mapping interval, this method performs mapping of given code to Unicode value.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • 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 Details

    • 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.