/** Returns true if the character at index is a literal, that is not editable. */ boolean isLiteral(int index) { if (isValidMask() && index < string.length()) { return literalMask.get(index); } return false; }