@@ -387,13 +387,6 @@ private static boolean flag(int flags, int bit) {
387387 return (flags & bit ) != 0 ;
388388 }
389389
390- // make a new FST; Builder invokes this
391- FST (FSTMetadata <T > metadata , Outputs <T > outputs , FSTReader fstReader ) {
392- this .metadata = metadata ;
393- this .outputs = outputs ;
394- this .fstReader = fstReader ;
395- }
396-
397390 private static final int DEFAULT_MAX_BLOCK_BITS = Constants .JRE_IS_64BIT ? 30 : 28 ;
398391
399392 /**
@@ -415,17 +408,23 @@ public FST(DataInput metaIn, DataInput in, Outputs<T> outputs, FSTStore fstStore
415408 }
416409
417410 /**
418- * Load a previously saved FST with a metadata object and a FSTStore. If using {@link
419- * OnHeapFSTStore}, setting maxBlockBits allows you to control the size of the byte[] pages used
420- * to hold the FST bytes.
411+ * This constructor is private as it only acts as a transition from the DataInput metadata
412+ * constructor to the FSTMetadata one
421413 */
422414 public FST (FSTMetadata <T > metadata , DataInput in , Outputs <T > outputs , FSTStore fstStore )
423415 throws IOException {
424416 this (metadata , outputs , fstStore .init (in , metadata .numBytes ));
425417 }
426418
419+ /** Load a previously saved FST with a metadata object and a FSTReader. */
420+ FST (FSTMetadata <T > metadata , Outputs <T > outputs , FSTReader fstReader ) {
421+ this .metadata = metadata ;
422+ this .outputs = outputs ;
423+ this .fstReader = fstReader ;
424+ }
425+
427426 /**
428- * Parse the FST metadata from DataInput
427+ * Read the FST metadata from DataInput
429428 *
430429 * @param metaIn the DataInput of the metadata
431430 * @param outputs the FST outputs
0 commit comments