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