Make `IntVersion` visible for alternate evaluator implementations.
@@ -17,9 +17,14 @@ import com.google.common.collect.Interner;
import com.google.devtools.build.lib.concurrent.BlazeInterners;
/** Versioning scheme based on integers. */
-final class IntVersion implements Version {
+public final class IntVersion implements Version {
+
private static final Interner<IntVersion> interner = BlazeInterners.newWeakInterner();
+ public static IntVersion of(long val) {
+ return interner.intern(new IntVersion(val));
+ }
+
private final long val;
private IntVersion(long val) {
@@ -30,14 +35,10 @@ final class IntVersion implements Version {
return val;
}
- IntVersion next() {
+ public IntVersion next() {
return of(val + 1);
}
- static IntVersion of(long val) {
- return interner.intern(new IntVersion(val));
- }
-
@Override
public boolean atMost(Version other) {
if (!(other instanceof IntVersion)) {
