private final void init(Version matchVersion) { if (matchVersion.onOrAfter(Version.LUCENE_4_7)) { this.scanner = new StandardTokenizerImpl(input); } else if (matchVersion.onOrAfter(Version.LUCENE_4_0)) { this.scanner = new StandardTokenizerImpl40(input); } else if (matchVersion.onOrAfter(Version.LUCENE_3_4)) { this.scanner = new StandardTokenizerImpl34(input); } else if (matchVersion.onOrAfter(Version.LUCENE_3_1)) { this.scanner = new StandardTokenizerImpl31(input); } else { this.scanner = new ClassicTokenizerImpl(input); } }
private final void init(Version matchVersion) { // best effort NPE if you dont call reset if (matchVersion.onOrAfter(Version.LUCENE_40)) { this.scanner = new StandardTokenizerImpl(null); } else if (matchVersion.onOrAfter(Version.LUCENE_34)) { this.scanner = new StandardTokenizerImpl34(null); } else if (matchVersion.onOrAfter(Version.LUCENE_31)) { this.scanner = new StandardTokenizerImpl31(null); } else { this.scanner = new ClassicTokenizerImpl(null); } }
private final void init(Version matchVersion) { if (matchVersion.onOrAfter(Version.LUCENE_47)) { this.scanner = new StandardTokenizerImpl(input); } else if (matchVersion.onOrAfter(Version.LUCENE_40)) { this.scanner = new StandardTokenizerImpl40(input); } else if (matchVersion.onOrAfter(Version.LUCENE_34)) { this.scanner = new StandardTokenizerImpl34(input); } else if (matchVersion.onOrAfter(Version.LUCENE_31)) { this.scanner = new StandardTokenizerImpl31(input); } else { this.scanner = new ClassicTokenizerImpl(input); } }
private final void init(Version matchVersion) { // best effort NPE if you dont call reset if (matchVersion.onOrAfter(Version.LUCENE_40)) { this.scanner = new StandardTokenizerImpl(input); } else if (matchVersion.onOrAfter(Version.LUCENE_34)) { this.scanner = new StandardTokenizerImpl34(input); } else if (matchVersion.onOrAfter(Version.LUCENE_31)) { this.scanner = new StandardTokenizerImpl31(input); } else { this.scanner = new ClassicTokenizerImpl(input); } }