mirror of https://github.com/apache/lucene.git
default PositiveIntOutputs to doShare=true
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1363004 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
6c08d7f2a4
commit
843d2d729e
|
@ -42,6 +42,15 @@ public final class PositiveIntOutputs extends Outputs<Long> {
|
|||
this.doShare = doShare;
|
||||
}
|
||||
|
||||
/** Returns the instance of PositiveIntOutputs. */
|
||||
public static PositiveIntOutputs getSingleton() {
|
||||
return getSingleton(true);
|
||||
}
|
||||
|
||||
/** Expert: pass doShare=false to disable output sharing.
|
||||
* In some cases this may result in a smaller FST,
|
||||
* however it will also break methods like {@link
|
||||
* Util#getByOutput} and {@link Util#shortestPaths}. */
|
||||
public static PositiveIntOutputs getSingleton(boolean doShare) {
|
||||
return doShare ? singletonShare : singletonNoShare;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue