LUCENE-6271: fix confusing naming... TODO: address SortingDocsEnum too

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/branches/lucene6271@1670480 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Muir 2015-03-31 21:08:35 +00:00
parent b9f4e66436
commit 7fb113ad3a
4 changed files with 11 additions and 11 deletions

View File

@ -222,17 +222,17 @@ public class FilterLeafReader extends LeafReader {
}
/** Base class for filtering {@link PostingsEnum} implementations. */
public static class FilterDocsEnum extends PostingsEnum {
/** The underlying DocsEnum instance. */
public static class FilterPostingsEnum extends PostingsEnum {
/** The underlying PostingsEnum instance. */
protected final PostingsEnum in;
/**
* Create a new FilterDocsEnum
* @param in the underlying DocsEnum instance.
* @param in the underlying PostingsEnum instance.
*/
public FilterDocsEnum(PostingsEnum in) {
public FilterPostingsEnum(PostingsEnum in) {
if (in == null) {
throw new NullPointerException("incoming DocsEnum cannot be null");
throw new NullPointerException("incoming PostingsEnum cannot be null");
}
this.in = in;
}

View File

@ -77,12 +77,12 @@ public class TestFilterLeafReader extends LuceneTestCase {
@Override
public PostingsEnum postings(Bits liveDocs, PostingsEnum reuse, int flags) throws IOException {
return new TestPositions(super.postings(liveDocs, reuse == null ? null : ((FilterDocsEnum) reuse).in, flags));
return new TestPositions(super.postings(liveDocs, reuse == null ? null : ((FilterPostingsEnum) reuse).in, flags));
}
}
/** Filter that only returns odd numbered documents. */
private static class TestPositions extends FilterDocsEnum {
private static class TestPositions extends FilterPostingsEnum {
public TestPositions(PostingsEnum in) {
super(in);
}
@ -188,7 +188,7 @@ public class TestFilterLeafReader extends LuceneTestCase {
checkOverrideMethods(FilterLeafReader.FilterFields.class);
checkOverrideMethods(FilterLeafReader.FilterTerms.class);
checkOverrideMethods(FilterLeafReader.FilterTermsEnum.class);
checkOverrideMethods(FilterLeafReader.FilterDocsEnum.class);
checkOverrideMethods(FilterLeafReader.FilterPostingsEnum.class);
}
public void testUnwrap() throws IOException {

View File

@ -326,7 +326,7 @@ public class SortingLeafReader extends FilterLeafReader {
}
}
static class SortingDocsEnum extends FilterDocsEnum {
static class SortingDocsEnum extends FilterPostingsEnum {
private static final class DocFreqSorter extends TimSorter {
@ -489,7 +489,7 @@ public class SortingLeafReader extends FilterLeafReader {
}
}
static class SortingPostingsEnum extends FilterDocsEnum {
static class SortingPostingsEnum extends FilterPostingsEnum {
/**
* A {@link TimSorter} which sorts two parallel arrays of doc IDs and

View File

@ -281,7 +281,7 @@ public class AssertingLeafReader extends FilterLeafReader {
static enum DocsEnumState { START, ITERATING, FINISHED };
/** Wraps a docsenum with additional checks */
public static class AssertingPostingsEnum extends FilterDocsEnum {
public static class AssertingPostingsEnum extends FilterPostingsEnum {
private final Thread creationThread = Thread.currentThread();
private DocsEnumState state = DocsEnumState.START;
int positionCount = 0;