Package com.itextpdf.layout.font
Class Range
java.lang.Object
com.itextpdf.layout.font.Range
- Direct Known Subclasses:
Range.FullRange
Class represents ordered list of
Range.SubRange
.
This class is used in FontInfo
as internal field and in one of the overloads of
the FontProvider.addFont(String, String, Range)
method as range
of characters to be used in font.
To create a custom Range instance RangeBuilder
shall be used.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static class
(package private) static class
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
Range()
(package private)
Range
(List<Range.SubRange> ranges) -
Method Summary
Modifier and TypeMethodDescriptionboolean
contains
(int n) Binary search over ordered segments.boolean
int
hashCode()
private static Range.SubRange[]
normalizeSubRanges
(List<Range.SubRange> ranges) Order ranges.toString()
-
Field Details
-
ranges
-
-
Constructor Details
-
Range
private Range() -
Range
Range(List<Range.SubRange> ranges)
-
-
Method Details
-
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
-
hashCode
public int hashCode() -
toString
-
normalizeSubRanges
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.
-