@Integer()
New in 2.0Generate random integer values (4 bytes)
Data TypesSince 2.0.0
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| min | Integer | — | 0 | Minimum value, default 0 |
| max | Integer | — | 2147483647 | Maximum value, default 2147483647 |
| 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
@Integer(nullWeight)Generate random integer between 0 and 2147483647 with null ratio
Example:
@Integer("1:2")Output:
8760182237null@Integer()Generate random integer between 0 and 2147483647
Example:
@Integer()
Output:
6668888@Integer(min,max,nullWeight)Generate random integer between min and max with null ratio
Example:
@Integer(-100000,100000,"1:3")
Output:
-7811null787321290976028@Integer(min,max)Generate random integer between min and max
Example:
@Integer(100,200)
Output:
162133191