Apache Solr open-source search software
add more missing javadocs
Robert Muirb655cf78bf24
diff --git a/lucene/build.xml b/lucene/build.xmlindex 82a65544788..1f133ad914d 100644--- a/lucene/build.xml+++ b/lucene/build.xml@@ -247,7 +247,7 @@<check-missing-javadocs dir="build/docs/sandbox" level="class"/><!-- spatial: problems --><check-missing-javadocs dir="build/docs/suggest" level="class"/>- <!-- test-framework: problems -->+ <check-missing-javadocs dir="build/docs/test-framework" level="class"/></sequential></target>diff --git a/lucene/core/src/java/org/apache/lucene/codecs/memory/DirectPostingsFormat.java b/lucene/core/src/java/org/apache/lucene/codecs/memory/DirectPostingsFormat.javaindex 03ebc6caf44..b8dc734d197 100644--- a/lucene/core/src/java/org/apache/lucene/codecs/memory/DirectPostingsFormat.java+++ b/lucene/core/src/java/org/apache/lucene/codecs/memory/DirectPostingsFormat.java@@ -1796,7 +1796,7 @@ public class DirectPostingsFormat extends PostingsFormat {}// Docs + freqs:- public final static class HighFreqDocsEnum extends DocsEnum {+ private final static class HighFreqDocsEnum extends DocsEnum {private int[] docIDs;private int[] freqs;private final Bits liveDocs;@@ -1969,7 +1969,7 @@ public class DirectPostingsFormat extends PostingsFormat {}// TODO: specialize offsets and not- public final static class HighFreqDocsAndPositionsEnum extends DocsAndPositionsEnum {+ private final static class HighFreqDocsAndPositionsEnum extends DocsAndPositionsEnum {private int[] docIDs;private int[] freqs;private int[][] positions;diff --git a/lucene/core/src/java/org/apache/lucene/index/MergeState.java b/lucene/core/src/java/org/apache/lucene/index/MergeState.javaindex fbfe063a5a7..a14da90899f 100644--- a/lucene/core/src/java/org/apache/lucene/index/MergeState.java+++ b/lucene/core/src/java/org/apache/lucene/index/MergeState.java@@ -29,6 +29,9 @@ import org.apache.lucene.util.packed.PackedInts;* @lucene.experimental */public class MergeState {+ /**+ * Remaps docids around deletes during merge+ */public static abstract class DocMap {private final Bits liveDocs;@@ -197,6 +200,9 @@ public class MergeState {public SegmentReader[] matchingSegmentReaders;public int matchedCount;+ /**+ * Class for recording units of work when merging segments.+ */public static class CheckAbort {private double workCount;private final MergePolicy.OneMerge merge;diff --git a/lucene/core/src/java/org/apache/lucene/index/MultiDocValues.java b/lucene/core/src/java/org/apache/lucene/index/MultiDocValues.javaindex abfc979c0dd..a079cd07d0c 100644--- a/lucene/core/src/java/org/apache/lucene/index/MultiDocValues.java+++ b/lucene/core/src/java/org/apache/lucene/index/MultiDocValues.java@@ -43,7 +43,7 @@ import org.apache.lucene.util.packed.PackedInts.Reader;* @lucene.experimental* @lucene.internal*/-public class MultiDocValues extends DocValues {+class MultiDocValues extends DocValues {private static DocValuesPuller DEFAULT_PULLER = new DocValuesPuller();private static final DocValuesPuller NORMS_PULLER = new DocValuesPuller() {diff --git a/lucene/core/src/java/org/apache/lucene/index/SortedBytesMergeUtils.java b/lucene/core/src/java/org/apache/lucene/index/SortedBytesMergeUtils.javaindex 023af1343f2..9f8df5b07b8 100644--- a/lucene/core/src/java/org/apache/lucene/index/SortedBytesMergeUtils.java+++ b/lucene/core/src/java/org/apache/lucene/index/SortedBytesMergeUtils.java@@ -32,6 +32,9 @@ import org.apache.lucene.util.PriorityQueue;import org.apache.lucene.util.packed.PackedInts;/**+ * Utility class for merging SortedBytes DocValues+ * instances.+ ** @lucene.internal*/public final class SortedBytesMergeUtils {diff --git a/lucene/core/src/java/org/apache/lucene/store/FSDirectory.java b/lucene/core/src/java/org/apache/lucene/store/FSDirectory.javaindex adf3f7099ae..d5151718430 100644--- a/lucene/core/src/java/org/apache/lucene/store/FSDirectory.java+++ b/lucene/core/src/java/org/apache/lucene/store/FSDirectory.java@@ -436,6 +436,9 @@ public abstract class FSDirectory extends Directory {return chunkSize;}+ /**+ * Writes output with {@link RandomAccessFile#write(byte[], int, int)}+ */protected static class FSIndexOutput extends BufferedIndexOutput {private final FSDirectory parent;private final String name;diff --git a/lucene/core/src/java/org/apache/lucene/store/NIOFSDirectory.java b/lucene/core/src/java/org/apache/lucene/store/NIOFSDirectory.javaindex 5f483fc6ba6..5098542a375 100644--- a/lucene/core/src/java/org/apache/lucene/store/NIOFSDirectory.java+++ b/lucene/core/src/java/org/apache/lucene/store/NIOFSDirectory.java@@ -106,6 +106,9 @@ public class NIOFSDirectory extends FSDirectory {};}+ /**+ * Reads bytes with {@link FileChannel#read(ByteBuffer, long)}+ */protected static class NIOFSIndexInput extends SimpleFSDirectory.SimpleFSIndexInput {private ByteBuffer byteBuf; // wraps the buffer for NIOdiff --git a/lucene/core/src/java/org/apache/lucene/store/RAMFile.java b/lucene/core/src/java/org/apache/lucene/store/RAMFile.javaindex e34610779f1..b89d308f41a 100644--- a/lucene/core/src/java/org/apache/lucene/store/RAMFile.java+++ b/lucene/core/src/java/org/apache/lucene/store/RAMFile.java@@ -19,7 +19,9 @@ package org.apache.lucene.store;import java.util.ArrayList;-/** @lucene.internal */+/**+ * Represents a file in RAM as a list of byte[] buffers.+ * @lucene.internal */public class RAMFile {protected ArrayList<byte[]> buffers = new ArrayList<byte[]>();long length;diff --git a/lucene/core/src/java/org/apache/lucene/store/SimpleFSDirectory.java b/lucene/core/src/java/org/apache/lucene/store/SimpleFSDirectory.javaindex e2deb92892a..e74e642ece9 100644--- a/lucene/core/src/java/org/apache/lucene/store/SimpleFSDirectory.java+++ b/lucene/core/src/java/org/apache/lucene/store/SimpleFSDirectory.java@@ -85,8 +85,16 @@ public class SimpleFSDirectory extends FSDirectory {};}+ /**+ * Reads bytes with {@link RandomAccessFile#seek(long)} followed by+ * {@link RandomAccessFile#read(byte[], int, int)}.+ */protected static class SimpleFSIndexInput extends BufferedIndexInput {+ /**+ * Extension of RandomAccessFile that tracks if the file is+ * open.+ */protected static class Descriptor extends RandomAccessFile {// remember if the file is open, so that we don't try to close it// more than oncediff --git a/lucene/core/src/test/org/apache/lucene/search/TestSimilarityProvider.java b/lucene/core/src/test/org/apache/lucene/search/TestSimilarityProvider.javaindex 9df5afbcdbc..4efee8654ee 100644--- a/lucene/core/src/test/org/apache/lucene/search/TestSimilarityProvider.java+++ b/lucene/core/src/test/org/apache/lucene/search/TestSimilarityProvider.java@@ -20,12 +20,13 @@ package org.apache.lucene.search;import org.apache.lucene.analysis.MockAnalyzer;import org.apache.lucene.document.Document;import org.apache.lucene.document.Field;+import org.apache.lucene.index.AtomicReader;+import org.apache.lucene.index.DirectoryReader;import org.apache.lucene.index.FieldInvertState;-import org.apache.lucene.index.IndexReader;import org.apache.lucene.index.IndexWriterConfig;-import org.apache.lucene.index.MultiDocValues;import org.apache.lucene.index.Norm;import org.apache.lucene.index.RandomIndexWriter;+import org.apache.lucene.index.SlowCompositeReaderWrapper;import org.apache.lucene.index.Term;import org.apache.lucene.search.similarities.PerFieldSimilarityWrapper;import org.apache.lucene.search.similarities.Similarity;@@ -36,7 +37,7 @@ import org.apache.lucene.util.LuceneTestCase;public class TestSimilarityProvider extends LuceneTestCase {private Directory directory;- private IndexReader reader;+ private DirectoryReader reader;private IndexSearcher searcher;@Override@@ -75,8 +76,9 @@ public class TestSimilarityProvider extends LuceneTestCase {public void testBasics() throws Exception {// sanity check of norms writer// TODO: generalize- byte fooNorms[] = (byte[]) MultiDocValues.getNormDocValues(reader, "foo").getSource().getArray();- byte barNorms[] = (byte[]) MultiDocValues.getNormDocValues(reader, "bar").getSource().getArray();+ AtomicReader slow = new SlowCompositeReaderWrapper(reader);+ byte fooNorms[] = (byte[]) slow.normValues("foo").getSource().getArray();+ byte barNorms[] = (byte[]) slow.normValues("bar").getSource().getArray();for (int i = 0; i < fooNorms.length; i++) {assertFalse(fooNorms[i] == barNorms[i]);}diff --git a/lucene/test-framework/src/java/org/apache/lucene/analysis/MockHoleInjectingTokenFilter.java b/lucene/test-framework/src/java/org/apache/lucene/analysis/MockHoleInjectingTokenFilter.javaindex 7685da23405..1718c1ce213 100644--- a/lucene/test-framework/src/java/org/apache/lucene/analysis/MockHoleInjectingTokenFilter.java+++ b/lucene/test-framework/src/java/org/apache/lucene/analysis/MockHoleInjectingTokenFilter.java@@ -29,7 +29,9 @@ import org.apache.lucene.util._TestUtil;// a MockRemovesTokensTF, ideally subclassing FilteringTF// (in modules/analysis)-// Randomly injects holes:+/**+ * Randomly injects holes (similar to what a stopfilter would do)+ */public final class MockHoleInjectingTokenFilter extends TokenFilter {private final long randomSeed;diff --git a/lucene/test-framework/src/java/org/apache/lucene/analysis/MockPayloadAnalyzer.java b/lucene/test-framework/src/java/org/apache/lucene/analysis/MockPayloadAnalyzer.javaindex 2c17c78b3cf..ebc32408ec6 100644--- a/lucene/test-framework/src/java/org/apache/lucene/analysis/MockPayloadAnalyzer.java+++ b/lucene/test-framework/src/java/org/apache/lucene/analysis/MockPayloadAnalyzer.java@@ -27,8 +27,9 @@ import java.io.Reader;/**- *- *+ * Wraps a whitespace tokenizer with a filter that sets+ * the first token, and odd tokens to posinc=1, and all others+ * to 0, encoding the position as pos: XXX in the payload.**/public final class MockPayloadAnalyzer extends Analyzer {diff --git a/lucene/test-framework/src/java/org/apache/lucene/codecs/lucene40ords/Lucene40WithOrds.java b/lucene/test-framework/src/java/org/apache/lucene/codecs/lucene40ords/Lucene40WithOrds.javaindex 5f34483d32b..38c0dcc3246 100644--- a/lucene/test-framework/src/java/org/apache/lucene/codecs/lucene40ords/Lucene40WithOrds.java+++ b/lucene/test-framework/src/java/org/apache/lucene/codecs/lucene40ords/Lucene40WithOrds.java@@ -30,6 +30,7 @@ import org.apache.lucene.codecs.PostingsReaderBase;import org.apache.lucene.codecs.PostingsWriterBase;import org.apache.lucene.codecs.TermsIndexReaderBase;import org.apache.lucene.codecs.TermsIndexWriterBase;+import org.apache.lucene.codecs.lucene40.Lucene40Codec; // javadocsimport org.apache.lucene.codecs.lucene40.Lucene40PostingsReader;import org.apache.lucene.codecs.lucene40.Lucene40PostingsWriter;import org.apache.lucene.index.SegmentReadState;@@ -39,6 +40,10 @@ import org.apache.lucene.util.BytesRef;// TODO: we could make separate base class that can wrapp// any PostingsBaseFormat and make it ord-able...+/**+ * Customized version of {@link Lucene40Codec} that uses+ * {@link FixedGapTermsIndexWriter}.+ */public class Lucene40WithOrds extends PostingsFormat {public Lucene40WithOrds() {diff --git a/lucene/test-framework/src/java/org/apache/lucene/codecs/mockintblock/MockFixedIntBlockPostingsFormat.java b/lucene/test-framework/src/java/org/apache/lucene/codecs/mockintblock/MockFixedIntBlockPostingsFormat.javaindex 8a0e9e157d8..468e1b51b73 100644--- a/lucene/test-framework/src/java/org/apache/lucene/codecs/mockintblock/MockFixedIntBlockPostingsFormat.java+++ b/lucene/test-framework/src/java/org/apache/lucene/codecs/mockintblock/MockFixedIntBlockPostingsFormat.java@@ -72,6 +72,9 @@ public class MockFixedIntBlockPostingsFormat extends PostingsFormat {return new MockIntFactory(blockSize);}+ /**+ * Encodes blocks as vInts of a fixed block size.+ */public static class MockIntFactory extends IntStreamFactory {private final int blockSize;diff --git a/lucene/test-framework/src/java/org/apache/lucene/codecs/mockintblock/MockVariableIntBlockPostingsFormat.java b/lucene/test-framework/src/java/org/apache/lucene/codecs/mockintblock/MockVariableIntBlockPostingsFormat.javaindex 8f569561d0e..1a38cb34e0d 100644--- a/lucene/test-framework/src/java/org/apache/lucene/codecs/mockintblock/MockVariableIntBlockPostingsFormat.java+++ b/lucene/test-framework/src/java/org/apache/lucene/codecs/mockintblock/MockVariableIntBlockPostingsFormat.java@@ -70,6 +70,10 @@ public class MockVariableIntBlockPostingsFormat extends PostingsFormat {return getName() + "(baseBlockSize="+ baseBlockSize + ")";}+ /**+ * If the first value is <= 3, writes baseBlockSize vInts at once,+ * otherwise writes 2*baseBlockSize vInts.+ */public static class MockIntFactory extends IntStreamFactory {private final int baseBlockSize;diff --git a/lucene/test-framework/src/java/org/apache/lucene/codecs/mocksep/MockSingleIntFactory.java b/lucene/test-framework/src/java/org/apache/lucene/codecs/mocksep/MockSingleIntFactory.javaindex 8c48f1f1541..ca42debdca2 100644--- a/lucene/test-framework/src/java/org/apache/lucene/codecs/mocksep/MockSingleIntFactory.java+++ b/lucene/test-framework/src/java/org/apache/lucene/codecs/mocksep/MockSingleIntFactory.java@@ -25,7 +25,10 @@ import org.apache.lucene.codecs.sep.IntStreamFactory;import java.io.IOException;-/** @lucene.experimental */+/**+ * Encodes ints directly as vInts with {@link MockSingleIntIndexOutput}+ * @lucene.experimental+ */public class MockSingleIntFactory extends IntStreamFactory {@Overridepublic IntIndexInput openInput(Directory dir, String fileName, IOContext context) throws IOException {diff --git a/lucene/test-framework/src/java/org/apache/lucene/codecs/mocksep/MockSingleIntIndexInput.java b/lucene/test-framework/src/java/org/apache/lucene/codecs/mocksep/MockSingleIntIndexInput.javaindex 924ba176748..328b1144438 100644--- a/lucene/test-framework/src/java/org/apache/lucene/codecs/mocksep/MockSingleIntIndexInput.java+++ b/lucene/test-framework/src/java/org/apache/lucene/codecs/mocksep/MockSingleIntIndexInput.java@@ -28,7 +28,7 @@ import org.apache.lucene.store.IndexInput;/** Reads IndexInputs written with {@link* MockSingleIntIndexOutput}. NOTE: this class is just for- * demonstration puprposes (it is a very slow way to read a+ * demonstration purposes (it is a very slow way to read a* block of ints).** @lucene.experimental@@ -54,6 +54,9 @@ public class MockSingleIntIndexInput extends IntIndexInput {in.close();}+ /**+ * Just reads a vInt directly from the file.+ */public static class Reader extends IntIndexInput.Reader {// clone:private final IndexInput in;diff --git a/lucene/test-framework/src/java/org/apache/lucene/index/AlcoholicMergePolicy.java b/lucene/test-framework/src/java/org/apache/lucene/index/AlcoholicMergePolicy.javaindex 64d54ecb80a..1ea95e12cca 100644--- a/lucene/test-framework/src/java/org/apache/lucene/index/AlcoholicMergePolicy.java+++ b/lucene/test-framework/src/java/org/apache/lucene/index/AlcoholicMergePolicy.java@@ -68,7 +68,7 @@ public class AlcoholicMergePolicy extends LogMergePolicy {return info.sizeInBytes();}- public static enum Drink {+ private static enum Drink {Beer(15), Wine(17), Champagne(21), WhiteRussian(22), SingleMalt(30);@@ -77,11 +77,6 @@ public class AlcoholicMergePolicy extends LogMergePolicy {Drink(long drunkFactor) {this.drunkFactor = drunkFactor;}-- public long drunk() {- return drunkFactor;- }-}}diff --git a/lucene/test-framework/src/java/org/apache/lucene/index/FieldFilterAtomicReader.java b/lucene/test-framework/src/java/org/apache/lucene/index/FieldFilterAtomicReader.javaindex 8e364b338d4..e2fcc2b725f 100644--- a/lucene/test-framework/src/java/org/apache/lucene/index/FieldFilterAtomicReader.java+++ b/lucene/test-framework/src/java/org/apache/lucene/index/FieldFilterAtomicReader.java@@ -23,6 +23,10 @@ import java.util.Iterator;import java.util.NoSuchElementException;import java.util.Set;+/**+ * A {@link FilterAtomicReader} that exposes only a subset+ * of fields from the underlying wrapped reader.+ */public final class FieldFilterAtomicReader extends FilterAtomicReader {private final Set<String> fields;diff --git a/lucene/test-framework/src/java/org/apache/lucene/search/ShardSearchingTestBase.java b/lucene/test-framework/src/java/org/apache/lucene/search/ShardSearchingTestBase.javaindex fc98095728f..e99f02d9cca 100644--- a/lucene/test-framework/src/java/org/apache/lucene/search/ShardSearchingTestBase.java+++ b/lucene/test-framework/src/java/org/apache/lucene/search/ShardSearchingTestBase.java@@ -42,9 +42,15 @@ import org.apache.lucene.util._TestUtil;// - doc blocks? so we can test joins/grouping...// - controlled consistency (NRTMgr)+/**+ * Base test class for simulating distributed search across multiple shards.+ */public abstract class ShardSearchingTestBase extends LuceneTestCase {// TODO: maybe SLM should throw this instead of returning null...+ /**+ * Thrown when the lease for a searcher has expired.+ */public static class SearcherExpiredException extends RuntimeException {public SearcherExpiredException(String message) {super(message);@@ -604,6 +610,9 @@ public abstract class ShardSearchingTestBase extends LuceneTestCase {}}+ /**+ * An IndexSearcher and associated version (lease)+ */protected static class SearcherAndVersion {public final IndexSearcher searcher;public final long version;diff --git a/lucene/test-framework/src/java/org/apache/lucene/store/MockDirectoryWrapper.java b/lucene/test-framework/src/java/org/apache/lucene/store/MockDirectoryWrapper.javaindex 5aff1dd43ce..c956f1f6e75 100644--- a/lucene/test-framework/src/java/org/apache/lucene/store/MockDirectoryWrapper.java+++ b/lucene/test-framework/src/java/org/apache/lucene/store/MockDirectoryWrapper.java@@ -146,6 +146,12 @@ public class MockDirectoryWrapper extends BaseDirectoryWrapper {preventDoubleWrite = value;}+ /**+ * Enum for controlling hard disk throttling.+ * Set via {@link MockDirectoryWrapper #setThrottling(Throttling)}+ * <p>+ * WARNING: can make tests very slow.+ */public static enum Throttling {/** always emulate a slow hard disk. could be very slow! */ALWAYS,diff --git a/lucene/test-framework/src/java/org/apache/lucene/util/English.java b/lucene/test-framework/src/java/org/apache/lucene/util/English.javaindex 1f1766f738c..5ff95a4ae2f 100644--- a/lucene/test-framework/src/java/org/apache/lucene/util/English.java+++ b/lucene/test-framework/src/java/org/apache/lucene/util/English.java@@ -18,6 +18,7 @@ package org.apache.lucene.util;*//**+ * Converts numbers to english strings for testing.* @lucene.internal*/public final class English {diff --git a/lucene/test-framework/src/java/org/apache/lucene/util/RollingBuffer.java b/lucene/test-framework/src/java/org/apache/lucene/util/RollingBuffer.javaindex c1ded254eb1..4450d3673a8 100644--- a/lucene/test-framework/src/java/org/apache/lucene/util/RollingBuffer.java+++ b/lucene/test-framework/src/java/org/apache/lucene/util/RollingBuffer.java@@ -26,6 +26,9 @@ package org.apache.lucene.util;* @lucene.internal */public abstract class RollingBuffer<T extends RollingBuffer.Resettable> {+ /**+ * Implement to reset an instance+ */public static interface Resettable {public void reset();}diff --git a/lucene/test-framework/src/java/org/apache/lucene/util/TestRuleFieldCacheSanity.java b/lucene/test-framework/src/java/org/apache/lucene/util/TestRuleFieldCacheSanity.javaindex ea5d632c690..7ad81a581aa 100644--- a/lucene/test-framework/src/java/org/apache/lucene/util/TestRuleFieldCacheSanity.java+++ b/lucene/test-framework/src/java/org/apache/lucene/util/TestRuleFieldCacheSanity.java@@ -1,10 +1,5 @@package org.apache.lucene.util;-import org.apache.lucene.search.FieldCache;-import org.junit.rules.TestRule;-import org.junit.runner.Description;-import org.junit.runners.model.Statement;-/** Licensed to the Apache Software Foundation (ASF) under one or more* contributor license agreements. See the NOTICE file distributed with@@ -22,6 +17,30 @@ import org.junit.runners.model.Statement;* limitations under the License.*/+import org.apache.lucene.search.FieldCache;+import org.apache.lucene.util.FieldCacheSanityChecker; // javadocs+import org.junit.rules.TestRule;+import org.junit.runner.Description;+import org.junit.runners.model.Statement;++/**+ * This rule will fail the test if it has insane field caches.+ * <p>+ * calling assertSaneFieldCaches here isn't as useful as having test+ * classes call it directly from the scope where the index readers+ * are used, because they could be gc'ed just before this tearDown+ * method is called.+ * <p>+ * But it's better then nothing.+ * <p>+ * If you are testing functionality that you know for a fact+ * "violates" FieldCache sanity, then you should either explicitly+ * call purgeFieldCache at the end of your test method, or refactor+ * your Test class so that the inconsistent FieldCache usages are+ * isolated in distinct test methods+ *+ * @see FieldCacheSanityChecker+ */public class TestRuleFieldCacheSanity implements TestRule {@Override@@ -33,18 +52,6 @@ public class TestRuleFieldCacheSanity implements TestRule {Throwable problem = null;try {- // calling assertSaneFieldCaches here isn't as useful as having test- // classes call it directly from the scope where the index readers- // are used, because they could be gc'ed just before this tearDown- // method is called.- //- // But it's better then nothing.- //- // If you are testing functionality that you know for a fact- // "violates" FieldCache sanity, then you should either explicitly- // call purgeFieldCache at the end of your test method, or refactor- // your Test class so that the inconsistent FieldCache usages are- // isolated in distinct test methodsLuceneTestCase.assertSaneFieldCaches(d.getDisplayName());} catch (Throwable t) {problem = t;diff --git a/lucene/test-framework/src/java/org/apache/lucene/util/TestRuleStoreClassName.java b/lucene/test-framework/src/java/org/apache/lucene/util/TestRuleStoreClassName.javaindex 093ed1dec88..1f17fbb5fff 100644--- a/lucene/test-framework/src/java/org/apache/lucene/util/TestRuleStoreClassName.java+++ b/lucene/test-framework/src/java/org/apache/lucene/util/TestRuleStoreClassName.java@@ -21,6 +21,10 @@ import org.junit.rules.TestRule;import org.junit.runner.Description;import org.junit.runners.model.Statement;+/**+ * Stores the suite name so you can retrieve it+ * from {@link #getTestClass()}+ */public class TestRuleStoreClassName implements TestRule {private volatile Description description;diff --git a/lucene/test-framework/src/java/org/apache/lucene/util/automaton/AutomatonTestUtil.java b/lucene/test-framework/src/java/org/apache/lucene/util/automaton/AutomatonTestUtil.javaindex c0cf4ca963a..e770a69ee80 100644--- a/lucene/test-framework/src/java/org/apache/lucene/util/automaton/AutomatonTestUtil.java+++ b/lucene/test-framework/src/java/org/apache/lucene/util/automaton/AutomatonTestUtil.java@@ -127,6 +127,13 @@ public class AutomatonTestUtil {return code;}+ /**+ * Lets you retrieve random strings accepted+ * by an Automaton.+ * <p>+ * Once created, call {@link #getRandomAcceptedString(Random)}+ * to get a new string (in UTF-32 codepoints).+ */public static class RandomAcceptedStrings {private final Map<Transition,Boolean> leadsToAccept;