@Test public void simpleCidr() { Ipv4FieldFactory factory = new Ipv4FieldFactory("127.0.0.0/30"); assertEquals(factory.newInstance(0), "127.0.0.0"); assertEquals(factory.newInstance(1), "127.0.0.1"); assertEquals(factory.newInstance(2), "127.0.0.2"); assertEquals(factory.newInstance(3), "127.0.0.3"); assertEquals(factory.newInstance(4), "127.0.0.0"); }
@Override public String newInstance(int uniqueId) { return AddressUtils.longToIpv4(longFactory.newInstance(uniqueId)); }
Ipv4FieldFactory extends AbstractFieldFactory<String> { @Override public String newInstance(int uniqueId) { return AddressUtils.longToIpv4(longFactory.newInstance(uniqueId)); } }
Ipv4FieldFactory extends AbstractFieldFactory<String> { @Override public String newInstance(int uniqueId) { return AddressUtils.longToIpv4(longFactory.newInstance(uniqueId)); } Ipv4FieldFactory(String address); }
Ipv4FieldFactory extends AbstractFieldFactory<String> { @Override public String newInstance(int uniqueId) { return AddressUtils.longToIpv4(longFactory.newInstance(uniqueId)); } Ipv4FieldFactory(String address); @Override String newInstance(int uniqueId); @Override String toString(); }
Ipv4FieldFactory extends AbstractFieldFactory<String> { @Override public String newInstance(int uniqueId) { return AddressUtils.longToIpv4(longFactory.newInstance(uniqueId)); } Ipv4FieldFactory(String address); @Override String newInstance(int uniqueId); @Override String toString();  }