io.cucumber.messages.IdGenerator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of messages Show documentation
Show all versions of messages Show documentation
JSON schema-based messages for Cucumber's inter-process communication
package io.cucumber.messages;
public interface IdGenerator {
String newId();
class Incrementing implements IdGenerator {
private int next = 0;
@Override
public String newId() {
return Integer.toString(next++);
}
}
class UUID implements IdGenerator {
@Override
public String newId() {
return java.util.UUID.randomUUID().toString();
}
}
}