private StandardTokenizerInterface getScannerFor(Version matchVersion) { // best effort NPE if you dont call reset if (matchVersion.onOrAfter(Version.LUCENE_4_7)) { return new UAX29URLEmailTokenizerImpl(input); } else if (matchVersion.onOrAfter(Version.LUCENE_4_0)) { return new UAX29URLEmailTokenizerImpl40(input); } else if (matchVersion.onOrAfter(Version.LUCENE_3_6)) { return new UAX29URLEmailTokenizerImpl36(input); } else if (matchVersion.onOrAfter(Version.LUCENE_3_4)) { return new UAX29URLEmailTokenizerImpl34(input); } else { return new UAX29URLEmailTokenizerImpl31(input); } }
private StandardTokenizerInterface getScannerFor(Version matchVersion) { // best effort NPE if you dont call reset if (matchVersion.onOrAfter(Version.LUCENE_47)) { return new UAX29URLEmailTokenizerImpl(input); } else if (matchVersion.onOrAfter(Version.LUCENE_40)) { return new UAX29URLEmailTokenizerImpl40(input); } else if (matchVersion.onOrAfter(Version.LUCENE_36)) { return new UAX29URLEmailTokenizerImpl36(input); } else if (matchVersion.onOrAfter(Version.LUCENE_34)) { return new UAX29URLEmailTokenizerImpl34(input); } else { return new UAX29URLEmailTokenizerImpl31(input); } }