public class WarningIdentifierSource extends java.lang.Object implements IdentifierSource
IdentifierSource
which logs a warning on every generation, and returns a dummy value.
Useful for generating a list of IDs which should later be explicity-provided.Modifier and Type | Field and Description |
---|---|
private static org.slf4j.Logger |
LOG |
private java.util.concurrent.atomic.AtomicInteger |
nextId |
Constructor and Description |
---|
WarningIdentifierSource(int initialId) |
Modifier and Type | Method and Description |
---|---|
int |
calculateId(java.lang.String name,
java.util.Set<java.lang.Integer> usedIds) |
private static final org.slf4j.Logger LOG
private final java.util.concurrent.atomic.AtomicInteger nextId
public int calculateId(java.lang.String name, java.util.Set<java.lang.Integer> usedIds)
calculateId
in interface IdentifierSource