public abstract class ContextualRule extends Object
Constructor and Description |
---|
ContextualRule() |
Modifier and Type | Method and Description |
---|---|
int |
getBacktrackContextLength()
Gets the length of the backtrack context glyph sequence defined by this rule
|
abstract int |
getContextLength()
Gets the length of the context glyph sequence defined by this rule
|
int |
getLookaheadContextLength()
Gets the length of the lookahead context glyph sequence defined by this rule
|
boolean |
isGlyphMatchesBacktrack(int glyphId, int atIdx)
Checks if glyph line element matches element from backtrack sequence of the rule.
|
abstract boolean |
isGlyphMatchesInput(int glyphId, int atIdx)
Checks if glyph line element matches element from input sequence of the rule.
|
boolean |
isGlyphMatchesLookahead(int glyphId, int atIdx)
Checks if glyph line element matches element from lookahead sequence of the rule.
|
public abstract int getContextLength()
public abstract boolean isGlyphMatchesInput(int glyphId, int atIdx)
glyphId
- glyph code id
atIdx
- index in the rule sequence. Shall be: 0 < atIdx < getContextLength()
true
if glyph matches element
public int getLookaheadContextLength()
public int getBacktrackContextLength()
public boolean isGlyphMatchesLookahead(int glyphId, int atIdx)
glyphId
- glyph code id
atIdx
- index in rule sequence. Shall be: 0 <= atIdx < getLookaheadContextLength()
true
if glyph matches element from lookahead sequence
public boolean isGlyphMatchesBacktrack(int glyphId, int atIdx)
glyphId
- glyph code id
atIdx
- index in rule sequence. Shall be: 0 <= atIdx < getBacktrackContextLength()
true
if glyph matches element from backtrack sequence
Copyright © 1998–2022 iText Group NV. All rights reserved.