Interface NumericIdSequence<N extends Comparable<N>>
-
- All Superinterfaces:
IdSequence<N>
- All Known Implementing Classes:
IntegerIdSequence
,PersistableIntIdSequence
,PersistableLongIdSequence
public interface NumericIdSequence<N extends Comparable<N>> extends IdSequence<N>
Sequience of values for one identifier.- Author:
- Leonid Bushuev from JetBrains
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description N
lastOne()
Checks the last used identifier.N
nextOne()
Produces the new identifier.Interval<N>
nextRange(int count)
Produces and returns a range of identifiers.
-
-
-
Method Detail
-
nextOne
@NotNull N nextOne()
Produces the new identifier.- Specified by:
nextOne
in interfaceIdSequence<N extends Comparable<N>>
- Returns:
- the new identifier.
-
nextRange
@NotNull Interval<N> nextRange(int count)
Produces and returns a range of identifiers.- Parameters:
count
- how many identifiers to produce.- Returns:
- a range of new identifiers.
-
lastOne
@NotNull N lastOne()
Checks the last used identifier.- Returns:
- the last used value.
-
-