@Long()
New in 2.0Generate random long values (8 bytes)
Data TypesSince 2.0.0
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| min | Long | — | 0 | Minimum value, default 0L (L indicates long type) |
| max | Long | — | 9223372036854775807 | Maximum value, default 9223372036854775807L |
| nullSampler | String | — | — | The null ratio, such as "1:2", indicates that generating a random value 3 times with an average of 1 time is null |
Usage
@Long(nullWeight)Generate random long between 0 and 9223372036854775807 with null ratio
Example:
@Long("1:2")Output:
98089null28907625479@Long()Generate random long between 0 and 9223372036854775807
Example:
@Long()
Output:
2567071027@Long(min,max,nullWeight)Generate random long between min and max with null ratio
Example:
@Long(-10000L,100000L,)
Output:
198594-17865987637092@Long(min,max)Generate random long between min and max
Example:
@Long(1L,10000000000L)
Output:
11093400897887256252199901