Update README.md

This commit is contained in:
Fabio Lima 2021-11-27 02:44:09 -03:00 committed by GitHub
parent 4b24b03f8f
commit e23370f5fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 17 additions and 0 deletions

View File

@ -234,6 +234,23 @@ UlidFactory factory = UlidFactory.newInstance(() -> {
Ulid ulid = factory.create(); Ulid ulid = factory.create();
``` ```
Use a key generator that makes substitution easy if necessary:
```java
package com.example;
import com.github.f4b6a3.ulid.UlidCreator;
public class KeyGenerator {
public static String next() {
return UlidCreator.getUlid().toString();
}
}
```
```java
String key = KeyGenerator.next();
```
Benchmark Benchmark
------------------------------------------------------ ------------------------------------------------------