Package org.sonar.api.utils.internal
Class AlwaysIncreasingSystem2
- java.lang.Object
-
- org.sonar.api.utils.System2
-
- org.sonar.api.utils.internal.AlwaysIncreasingSystem2
-
public class AlwaysIncreasingSystem2 extends System2
A subclass ofSystem2
which implementation ofSystem2.now()
always return a bigger value than the previous returned value.This class is intended to be used in Unit tests.
-
-
Constructor Summary
Constructors Constructor Description AlwaysIncreasingSystem2()
Values returned bynow()
will start with a random value and increment by 100.AlwaysIncreasingSystem2(long increment)
AlwaysIncreasingSystem2(long initialValue, int increment)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
now()
-
Methods inherited from class org.sonar.api.utils.System2
close, envVariable, envVariables, getDefaultTimeZone, getResource, isJavaAtLeast17, isOsWindows, println, properties, property, setProperty
-
-
-
-
Constructor Detail
-
AlwaysIncreasingSystem2
public AlwaysIncreasingSystem2(long increment)
-
AlwaysIncreasingSystem2
public AlwaysIncreasingSystem2(long initialValue, int increment)
-
AlwaysIncreasingSystem2
public AlwaysIncreasingSystem2()
Values returned bynow()
will start with a random value and increment by 100.
-
-