public class Nanoids extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
static Function3<String,Integer,BytesRandom,String> |
SIMPLE_ID_FUN |
static Function3<String,Integer,BytesRandom,String> |
STEP_ID_FUN
基于步长 的ID生成器
|
static String |
URL_ALPHABET
This alphabet uses `A-Za-z0-9_-` symbols.
|
| 限定符和类型 | 方法和说明 |
|---|---|
static String |
nanoid(String alphabet,
int expectedIdLength) |
static String |
nanoid(String alphabet,
int expectedIdLength,
BytesRandom randomBytesSupplier,
Function3<String,Integer,BytesRandom,String> idGenFun) |
static String |
nanoid(String alphabet,
int expectedIdLength,
Function3<String,Integer,BytesRandom,String> idGenFun) |
static String |
urlNanoid() |
static String |
urlNanoid(int expectedIdLength) |
public static final Function3<String,Integer,BytesRandom,String> STEP_ID_FUN
public static final Function3<String,Integer,BytesRandom,String> SIMPLE_ID_FUN
public static String urlNanoid()
public static String urlNanoid(int expectedIdLength)
public static String nanoid(@NotEmpty String alphabet, @IntLimit(value=21,min=1) int expectedIdLength)
public static String nanoid(@NotEmpty String alphabet, @IntLimit(value=21,min=1) int expectedIdLength, @NonNull Function3<String,Integer,BytesRandom,String> idGenFun)
Copyright © 2022. All rights reserved.