Java 类org.apache.lucene.analysis.miscellaneous.EmptyTokenStream 实例源码

项目:lucenelab    文件:AnnotatorTokenFilterTest.java   
@Test
public void returns_false_when_no_more_tokens() throws IOException {
    try (TokenFilter f = new AnnotatorTokenFilter(new EmptyTokenStream(), annotator)) {
        f.reset();
        assertThat(f.incrementToken()).isFalse();
    }
}
项目:lucenelab    文件:PreAnnotatedTokenFilterTest.java   
@Test
public void returns_false_when_no_more_tokens() throws IOException {
    try (TokenFilter f = new PreAnnotatedTokenFilter(new EmptyTokenStream(), 1, 2)) {
        f.reset();
        assertThat(f.incrementToken()).isFalse();
    }
}
项目:lucenelab    文件:SimplePreAnnotatedTokenFilterTest.java   
@Test
public void returns_false_when_no_more_tokens() throws IOException {
    try (TokenFilter f = new SimplePreAnnotatedTokenFilter(new EmptyTokenStream(), 1, 2)) {
        f.reset();
        assertThat(f.incrementToken()).isFalse();
    }
}
项目:community-edition-old    文件:EmptyAnalyser.java   
/**
 * Constructs a {@link TokenStream} that returns nothing
 */
public TokenStream tokenStream(String fieldName, Reader reader)
{
    return new EmptyTokenStream();
}
项目:lucenelab    文件:PreAnnotatedTokenFilterTest.java   
@SuppressWarnings({ "unused", "resource" })
@Test
public void fails_if_no_annotation_markers() {
    expected.expect(IllegalArgumentException.class);
    new PreAnnotatedTokenFilter(new EmptyTokenStream());
}
项目:lucenelab    文件:SimplePreAnnotatedTokenFilterTest.java   
@SuppressWarnings({ "unused", "resource" })
@Test
public void fails_if_no_annotation_markers() {
    expected.expect(IllegalArgumentException.class);
    new SimplePreAnnotatedTokenFilter(new EmptyTokenStream());
}