Package org.verapdf.pd.font.cmap
Class ToUnicodeInterval
java.lang.Object
org.verapdf.pd.font.cmap.ToUnicodeInterval
Represents interval of mappings to Unicode.
- Author:
- Sergey Shemyakov
-
Constructor Summary
ConstructorsConstructorDescriptionToUnicodeInterval(long intervalBegin, long intervalEnd, byte[] startingValue) -
Method Summary
Modifier and TypeMethodDescriptionbooleancontainsCode(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.
-
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
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.
-