of


Description:

public static Result<Snowflake,Error> of (int nodeId)

Creates a generator with node ID.

Parameters:

nodeId

node ID in [0, 1023].

Returns:

Result.ok(generator), or Result.error(SnowflakeError.INVALID_ARGUMENT) when nodeId is out of range.