Update README.md
This commit is contained in:
parent
4b24b03f8f
commit
e23370f5fd
17
README.md
17
README.md
|
@ -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
|
||||||
------------------------------------------------------
|
------------------------------------------------------
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue