Update README.md
This commit is contained in:
parent
5d46bbf2fc
commit
bf3b93167b
|
@ -183,7 +183,7 @@ Instant instant = Ulid.getInstant("0123456789ABCDEFGHJKMNPQRS"); // 2007-02-16T0
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
Use a key generator that makes substitution easy if necessary:
|
A key generator that makes substitution easy if necessary:
|
||||||
|
|
||||||
```java
|
```java
|
||||||
package com.example;
|
package com.example;
|
||||||
|
@ -202,7 +202,7 @@ String key = KeyGenerator.next();
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
Use a `UlidFactory` with `java.util.Random`:
|
A `UlidFactory` with `java.util.Random`:
|
||||||
|
|
||||||
```java
|
```java
|
||||||
// use a `java.util.Random` instance for fast generation
|
// use a `java.util.Random` instance for fast generation
|
||||||
|
@ -214,7 +214,7 @@ Ulid ulid = factory.create();
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
Use a `UlidFactory` with `ThreadLocalRandom` inside of a `Supplier<byte[]>`:
|
A `UlidFactory` with `ThreadLocalRandom` inside of a `Supplier<byte[]>`:
|
||||||
|
|
||||||
```java
|
```java
|
||||||
// use a random supplier that returns an array of 10 bytes
|
// use a random supplier that returns an array of 10 bytes
|
||||||
|
|
Loading…
Reference in New Issue