class Internet: YamlFakeDataProvider<Internet>
Fields
Name | Description |
---|---|
protected yamlCategory: override
|
Category for This is the key entry after the For example
then the yamlCategory would be YamlCategory.ADDRESS NB! If the secondaryCategory is NOT set,the dictionary filename should match the yamlCategory name,i.e. the file name should be |
protected localUniqueDataProvider: LocalUniqueDataProvider<Internet>
|
A LocalUniqueDataProvider instance that is used with this unique provider. |
val unique: Internet
|
An instance of T for generating unique values |
Methods
domain
fun domain(subdomain: Boolean, domain: String?): String
Parameters
Name | Description |
---|---|
subdomain: Boolean
|
|
domain: String?
|
ReturnValue
Name | Description |
---|---|
String
|
iPv4Address
fun iPv4Address(): ()
Returns a random IPv4 address
ReturnValue
Name | Description |
---|---|
()
|
privateIPv4Address
fun privateIPv4Address(): String
Returns a random private IPv4 address
ReturnValue
Name | Description |
---|---|
String
|
publicIPv4Address
fun publicIPv4Address(): String
Returns a random public IPv4 address
ReturnValue
Name | Description |
---|---|
String
|
iPv6Address
fun iPv6Address(): String
Returns a random IPv6 address
Example:
Faker().internet.iPv6Address() // => 176f:cfec:c73b:e0cb:534d:4b3e:db4e:3b53
ReturnValue
Name | Description |
---|---|
String
|
macAddress
fun macAddress(prefix: String): String
Returns a random mac-address with an optional prefix
Examples:
Faker().internet.macAddress() // => 17:12:d9:fc:fe:f6
Faker().internet.macAddress("a") // => 0a:11:ed:7c:b5:af
Faker().internet.macAddress("aa") // => aa:ec:eb:54:b9:f5
Faker().internet.macAddress("aa:ce") // => aa:ce:e3:e1:83:c4
Parameters
Name | Description |
---|---|
prefix: String
|
ReturnValue
Name | Description |
---|---|
String
|
fun email(name: String): String
Parameters
Name | Description |
---|---|
name: String
|
ReturnValue
Name | Description |
---|---|
String
|
safeEmail
fun safeEmail(name: String): String
Parameters
Name | Description |
---|---|
name: String
|
ReturnValue
Name | Description |
---|---|
String
|
slug
fun slug(): String
ReturnValue
Name | Description |
---|---|
String
|
domainSuffix
fun domainSuffix(): String
ReturnValue
Name | Description |
---|---|
String
|
safeDomainSuffix
fun safeDomainSuffix(): String
ReturnValue
Name | Description |
---|---|
String
|
userAgent
fun userAgent(browserType: String): String
Parameters
Name | Description |
---|---|
browserType: String
|
ReturnValue
Name | Description |
---|---|
String
|
botUserAgent
fun botUserAgent(type: String): String
Parameters
Name | Description |
---|---|
type: String
|
ReturnValue
Name | Description |
---|---|
String
|
FakeDataProvider implementation for YamlCategory.INTERNET category.