Package org.verapdf.pd.font.cmap
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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontainsCode(long code)Checks if given code can be successfully mapped to cid with this mapping interval.StringtoUnicode(int code)If code is in mapping interval, this method performs mapping of given code to Unicode value.
-
-
-
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.
-
-