All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.cucumber.messages.IdGenerator Maven / Gradle / Ivy

There is a newer version: 27.0.2
Show newest version
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();
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy