public class EscapePair
extends java.lang.Object
GMFFUserTextEscapes
which holds a
single escape char number and its replacement text.
Metamath allows only 7-bit ASCII characters but EscapesPair
accomodates 8 bits just to avoid having to answer questions :-)
It is basically just a data structure with some attached utility functions on the data elements.
The reason for creating this class is that GMFF parameter type RunParms are not validated and processed until GMFF is initialized, typically when the user requests an export. So the RunParms are cached until initialization time.
Modifier and Type | Field and Description |
---|---|
int |
num |
java.lang.String |
replacement |
Constructor and Description |
---|
EscapePair(int num,
java.lang.String replacement)
Standard constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
validateEscapePair(java.lang.String exportType)
Validates the Num and Replacement fields individually.
|
void |
validateNum(java.lang.String exportType)
Validates the Num field.
|
void |
validateReplacement(java.lang.String exportType)
Validates the Replacement field
|
public EscapePair(int num, java.lang.String replacement)
No validation is done at this time. Just load the data structure.
num
- the escaped character's numeric valuereplacement
- the text which replaces the escaped character.public void validateEscapePair(java.lang.String exportType) throws GMFFException
exportType
- the export type, for error reportingGMFFException
- if error found.public void validateNum(java.lang.String exportType) throws GMFFException
Num must be > -1 and < 256.
exportType
- the export type, for error reportingGMFFException
- if error found.public void validateReplacement(java.lang.String exportType) throws GMFFException
Replacement must not be null and not an empty String.
exportType
- the export type, for error reportingGMFFException
- if error found.