
hope.kola.contract.faker.IP6Pulsar Maven / Gradle / Ivy
package hope.kola.contract.faker;
/** refer: https://zhuanlan.zhihu.com/p/366049271 */
public class IP6Pulsar implements Pulsar {
private static int next1to4() {
return FAKER.number().numberBetween(1, 4);
}
/**
*
* ip.match(/^([a-f0-9]{1,4}:){7}[a-f0-9]{1,4}$/i)
*
*
* @return
*/
@Override
public String next() {
String sb =
FAKER.random().hex(next1to4())
+ ":"
+ FAKER.random().hex(next1to4())
+ ":"
+ FAKER.random().hex(next1to4())
+ ":"
+ FAKER.random().hex(next1to4())
+ ":"
+ FAKER.random().hex(next1to4())
+ ":"
+ FAKER.random().hex(next1to4())
+ ":"
+ FAKER.random().hex(next1to4())
+ ":"
+ FAKER.random().hex(next1to4());
return sb;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy