The ylem-ids
project contains code for working with identifiers, such
as generating them via LongIdGenerator
and encoding/decoding them using
LongIdCodec
.
// Generate identifiers
LongIdGenerator ids = new SimpleLongIdGenerator();
long id = ids.next();
// Encoding and decoding
LongIdCodec<String> codec = new Base62LongIdCodec();
String encoded = codec.encode(id);
long decoded = codec.decode(encoded);
This project is licensed under the MIT license,
see the file LICENSE.md
for details.