public void addSentenceAsFirstOption ( MtasCQLParserSentenceCondition s ) throws ParseException { if ( ! simplified ) { MtasCQLParserSentenceCondition sentenceCurrent ; List < MtasCQLParserSentenceCondition > sentenceSequence ; if ( isBasic ( ) ) { if ( basicSentence == null ) { sentenceSequence = new ArrayList < MtasCQLParserSentenceCondition > ( ) ; sentenceCurrent = s ; sentenceSequence . add ( sentenceCurrent ) ; sequenceList . add ( sentenceSequence ) ; // not simple anymore basic = false ; } else { // add sentence as first option sentenceSequence = new ArrayList < MtasCQLParserSentenceCondition > ( ) ; sentenceCurrent = s ; sentenceSequence . add ( sentenceCurrent ) ; sequenceList . add ( sentenceSequence ) ; // add previous basic sentence as new option sentenceSequence = new ArrayList < MtasCQLParserSentenceCondition > ( ) ; sentenceCurrent = new MtasCQLParserSentenceCondition ( basicSentence , ignore , maximumIgnoreLength ) ; sentenceSequence . add ( sentenceCurrent ) ; sequenceList . add ( sentenceSequence ) ; basicSentence = null ; // not simple anymore basic = false ; } } else { sentenceSequence = new ArrayList < MtasCQLParserSentenceCondition > ( ) ; sentenceCurrent = s ; sentenceSequence . add ( sentenceCurrent ) ; List < List < MtasCQLParserSentenceCondition > > newsequenceList = new ArrayList < List < MtasCQLParserSentenceCondition > > ( ) ; newsequenceList . add ( sentenceSequence ) ; newsequenceList . addAll ( sequenceList ) ; sequenceList = newsequenceList ; } } else { throw new ParseException ( "already simplified" ) ; } }
Adds the sentence as first option .