MCPcopy Create free account
hub / github.com/DiUS/java-faker / ipV4Address

Method ipV4Address

src/main/java/com/github/javafaker/Internet.java:175–181  ·  view source on GitHub ↗

returns an IPv4 address in dot separated octets. @return a correctly formatted IPv4 address.

()

Source from the content-addressed store, hash-verified

173 * @return a correctly formatted IPv4 address.
174 */
175 public String ipV4Address() {
176 return String.format("%d.%d.%d.%d",
177 faker.random().nextInt(254) + 2,
178 faker.random().nextInt(254) + 2,
179 faker.random().nextInt(254) + 2,
180 faker.random().nextInt(254) + 2);
181 }
182
183 /**
184 * @return a valid private IPV4 address in dot notation

Callers 2

ipV4CidrMethod · 0.95
testIpV4AddressMethod · 0.80

Calls 2

nextIntMethod · 0.80
randomMethod · 0.45

Tested by 1

testIpV4AddressMethod · 0.64