net.sf.saxon.regex

Class SurrogateRegexTranslator.SimpleCharClass

Enclosing Class:
SurrogateRegexTranslator
Known Direct Subclasses:
SurrogateRegexTranslator.CharRange, SurrogateRegexTranslator.Empty, SurrogateRegexTranslator.Property, SurrogateRegexTranslator.SingleChar, SurrogateRegexTranslator.WideSingleChar

public static abstract class SurrogateRegexTranslator.SimpleCharClass
extends SurrogateRegexTranslator.CharClass

Simple Character Class - essentially, anything other than a Union or Subtraction between two character classes.

Constructor Summary

SimpleCharClass(int containsBmp, int containsNonBmp)
Create a SimpleCharClass

Method Summary

abstract void
inClassOutputBmp(FastStringBuffer buf)
Output a representation of the subset of this character class that's within the BMP, to a supplied buffer, using regex syntax that will be valid within a character class expression (that is, within square brackets)
void
outputBmp(FastStringBuffer buf)
Output a representation of the subset of this character class that's within the BMP, to a supplied buffer
void
outputComplementBmp(FastStringBuffer buf)
Output a representation of the subset of this character class that's outwith the BMP, to a supplied buffer.

Methods inherited from class net.sf.saxon.regex.SurrogateRegexTranslator.CharClass

addNonBmpRanges, getContainsBmp, getContainsNonBmp, getSingleChar, output, outputBmp, outputComplementBmp

Constructor Details

SimpleCharClass

public SimpleCharClass(int containsBmp,
                       int containsNonBmp)
Create a SimpleCharClass
Parameters:
containsBmp - true if the class includes BMP characters
containsNonBmp - true if the class includes non-BMP characters

Method Details

inClassOutputBmp

public abstract void inClassOutputBmp(FastStringBuffer buf)
Output a representation of the subset of this character class that's within the BMP, to a supplied buffer, using regex syntax that will be valid within a character class expression (that is, within square brackets)
Parameters:
buf - the supplied buffer

outputBmp

public void outputBmp(FastStringBuffer buf)
Output a representation of the subset of this character class that's within the BMP, to a supplied buffer
Overrides:
outputBmp in interface SurrogateRegexTranslator.CharClass
Parameters:
buf - the supplied buffer

outputComplementBmp

public void outputComplementBmp(FastStringBuffer buf)
Output a representation of the subset of this character class that's outwith the BMP, to a supplied buffer. Must not call if containsBmp == ALL
Overrides:
outputComplementBmp in interface SurrogateRegexTranslator.CharClass
Parameters:
buf - the supplied buffer