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:
Michael McCandless 2012-07-18 16:21:32 +00:00
parent 6c08d7f2a4
commit 843d2d729e
1 changed files with 9 additions and 0 deletions

View File

@ -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;
}