@Test public void oneAddress() { Ipv4FieldFactory factory = new Ipv4FieldFactory("192.168.0.101/32"); assertEquals(factory.newInstance(0), "192.168.0.101"); assertEquals(factory.newInstance(1), "192.168.0.101"); assertEquals(factory.newInstance(2), "192.168.0.101"); }
@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();  }