From e23370f5fda82e30c27a872cd81d7aa72d48f92c Mon Sep 17 00:00:00 2001 From: Fabio Lima Date: Sat, 27 Nov 2021 02:44:09 -0300 Subject: [PATCH] Update README.md --- README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/README.md b/README.md index a22abc3..b4891ac 100644 --- a/README.md +++ b/README.md @@ -234,6 +234,23 @@ UlidFactory factory = UlidFactory.newInstance(() -> { 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 ------------------------------------------------------