@Test public void testExpandBinding() throws Exception { assertEquals(256, Search.expandBinding( new MasterDatabaseBindingBuilder().setIpPrefix(IpPrefixConv.createPrefix("130.4.102.1/24")).build(), Short.MAX_VALUE).size()); assertEquals(256, Search.expandBinding( new MasterDatabaseBindingBuilder().setIpPrefix(IpPrefixConv.createPrefix("2001:db8::ff00:42:8329/120")) .build(), Short.MAX_VALUE).size()); }
public static <T extends SxpBindingFields> List<T> expandBinding(T binding, int quantity) { final MasterDatabaseBindingBuilder bindingBuilder = new MasterDatabaseBindingBuilder(binding); return expandPrefix(binding.getIpPrefix(), quantity).map(inetAddress -> { if (binding.getIpPrefix().getIpv4Prefix() != null) { bindingBuilder.setIpPrefix(new IpPrefix(IetfInetUtil.INSTANCE.ipv4PrefixFor(inetAddress, 32))); } else { bindingBuilder.setIpPrefix(new IpPrefix(IetfInetUtil.INSTANCE.ipv6PrefixFor(inetAddress, 128))); } return (T) bindingBuilder.build(); }).collect(Collectors.toList()); }
Search { public static <T extends SxpBindingFields> List<T> expandBinding(T binding, int quantity) { final MasterDatabaseBindingBuilder bindingBuilder = new MasterDatabaseBindingBuilder(binding); return expandPrefix(binding.getIpPrefix(), quantity).map(inetAddress -> { if (binding.getIpPrefix().getIpv4Prefix() != null) { bindingBuilder.setIpPrefix(new IpPrefix(IetfInetUtil.INSTANCE.ipv4PrefixFor(inetAddress, 32))); } else { bindingBuilder.setIpPrefix(new IpPrefix(IetfInetUtil.INSTANCE.ipv6PrefixFor(inetAddress, 128))); } return (T) bindingBuilder.build(); }).collect(Collectors.toList()); } }
Search { public static <T extends SxpBindingFields> List<T> expandBinding(T binding, int quantity) { final MasterDatabaseBindingBuilder bindingBuilder = new MasterDatabaseBindingBuilder(binding); return expandPrefix(binding.getIpPrefix(), quantity).map(inetAddress -> { if (binding.getIpPrefix().getIpv4Prefix() != null) { bindingBuilder.setIpPrefix(new IpPrefix(IetfInetUtil.INSTANCE.ipv4PrefixFor(inetAddress, 32))); } else { bindingBuilder.setIpPrefix(new IpPrefix(IetfInetUtil.INSTANCE.ipv6PrefixFor(inetAddress, 128))); } return (T) bindingBuilder.build(); }).collect(Collectors.toList()); } private  Search(); }
Search { public static <T extends SxpBindingFields> List<T> expandBinding(T binding, int quantity) { final MasterDatabaseBindingBuilder bindingBuilder = new MasterDatabaseBindingBuilder(binding); return expandPrefix(binding.getIpPrefix(), quantity).map(inetAddress -> { if (binding.getIpPrefix().getIpv4Prefix() != null) { bindingBuilder.setIpPrefix(new IpPrefix(IetfInetUtil.INSTANCE.ipv4PrefixFor(inetAddress, 32))); } else { bindingBuilder.setIpPrefix(new IpPrefix(IetfInetUtil.INSTANCE.ipv6PrefixFor(inetAddress, 128))); } return (T) bindingBuilder.build(); }).collect(Collectors.toList()); } private  Search(); static InetAddress getBestLocalDeviceAddress(); static List<T> expandBindings(List<T> bindings, int quantity); static List<T> expandBinding(T binding, int quantity); static Stream<InetAddress> expandPrefix(final IpPrefix prefix); static Stream<InetAddress> expandPrefix(final IpPrefix prefix, final long limit); static String getAddress(
            org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress address); }
Search { public static <T extends SxpBindingFields> List<T> expandBinding(T binding, int quantity) { final MasterDatabaseBindingBuilder bindingBuilder = new MasterDatabaseBindingBuilder(binding); return expandPrefix(binding.getIpPrefix(), quantity).map(inetAddress -> { if (binding.getIpPrefix().getIpv4Prefix() != null) { bindingBuilder.setIpPrefix(new IpPrefix(IetfInetUtil.INSTANCE.ipv4PrefixFor(inetAddress, 32))); } else { bindingBuilder.setIpPrefix(new IpPrefix(IetfInetUtil.INSTANCE.ipv6PrefixFor(inetAddress, 128))); } return (T) bindingBuilder.build(); }).collect(Collectors.toList()); } private  Search(); static InetAddress getBestLocalDeviceAddress(); static List<T> expandBindings(List<T> bindings, int quantity); static List<T> expandBinding(T binding, int quantity); static Stream<InetAddress> expandPrefix(final IpPrefix prefix); static Stream<InetAddress> expandPrefix(final IpPrefix prefix, final long limit); static String getAddress(
            org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress address);  }