Class IntegerIdSequence
- java.lang.Object
-
- jetbrains.buildServer.serverSide.db.IntegerIdSequence
-
- All Implemented Interfaces:
IdSequence<Integer>
,NumericIdSequence<Integer>
public final class IntegerIdSequence extends Object implements NumericIdSequence<Integer>
- Author:
- Leonid Bushuev from JetBrains
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Integer
lastOne()
Checks the last used identifier.Integer
nextOne()
Produces the new identifier.Interval<Integer>
nextRange(int count)
Produces and returns a range of identifiers.void
resetCounter()
This method is for testing purposes only.
-
-
-
Method Detail
-
nextOne
@NotNull public Integer nextOne()
Description copied from interface:NumericIdSequence
Produces the new identifier.- Specified by:
nextOne
in interfaceIdSequence<Integer>
- Specified by:
nextOne
in interfaceNumericIdSequence<Integer>
- Returns:
- the new identifier.
-
nextRange
@NotNull public Interval<Integer> nextRange(int count)
Description copied from interface:NumericIdSequence
Produces and returns a range of identifiers.- Specified by:
nextRange
in interfaceNumericIdSequence<Integer>
- Parameters:
count
- how many identifiers to produce.- Returns:
- a range of new identifiers.
-
lastOne
@NotNull public Integer lastOne()
Description copied from interface:NumericIdSequence
Checks the last used identifier.- Specified by:
lastOne
in interfaceNumericIdSequence<Integer>
- Returns:
- the last used value.
-
resetCounter
public void resetCounter()
This method is for testing purposes only. Never use this method!
-
-