Class InetGenerator
- All Implemented Interfaces:
DataGenerator<String>
Generates IPv4 host addresses as a dotted-quad
String, e.g. 12.198.4.251.
Each of the four octets is drawn from 1..255 (inclusive), so the value is a valid
PostgreSQL inet host address. Output is seeded and therefore reproducible for a given
random source.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class AbstractDataGenerator
random, randomUtils -
Method Summary
Methods inherited from class AbstractDataGenerator
generateAndSet, reseed, set
-
Method Details
-
generate
Description copied from interface:DataGeneratorGenerates a random value of type T.- Returns:
- a generated value, may be null if the generator supports nullable columns
-
generateAsString
Description copied from interface:DataGeneratorGenerates a value and returns its string representation.- Specified by:
generateAsStringin interfaceDataGenerator<String>- Overrides:
generateAsStringin classAbstractDataGenerator<String>- Returns:
- the string representation of a generated value
-
get
Description copied from interface:DataGeneratorRetrieves a value from a ResultSet column.- Parameters:
resultSet- the result set to read fromcolumnIndex- the 1-based column index- Returns:
- the value from the result set, properly cast to type T
- Throws:
SQLException- if the database operation fails
-