@Test public void testSelectionSingleBox1() throws Exception { List<NetworkInformation> collection = new ArrayList<>(); NetworkInformation information = new NetworkInformation(); information.addIpAddress("192.168.21.12"); information.addIpAddress("10.0.27.19"); collection.add(information); NetworkOrganizer organizer = new NetworkOrganizer(collection, "192.168.0.0/16"); List<String> shards = organizer.getSubset(10); assertEquals(1, shards.size()); }
public List<String> getSubset(int numShards) { return getSubset(numShards, null); }
NetworkOrganizer { public List<String> getSubset(int numShards) { return getSubset(numShards, null); } }
NetworkOrganizer { public List<String> getSubset(int numShards) { return getSubset(numShards, null); } protected  NetworkOrganizer(@NonNull Collection<NetworkInformation> infoSet);  NetworkOrganizer(@NonNull Collection<NetworkInformation> infoSet, String mask);  NetworkOrganizer(@NonNull String networkMask); }
NetworkOrganizer { public List<String> getSubset(int numShards) { return getSubset(numShards, null); } protected  NetworkOrganizer(@NonNull Collection<NetworkInformation> infoSet);  NetworkOrganizer(@NonNull Collection<NetworkInformation> infoSet, String mask);  NetworkOrganizer(@NonNull String networkMask); String getMatchingAddress(); List<String> getSubset(int numShards); List<String> getSubset(int numShards, Collection<String> primary); }
NetworkOrganizer { public List<String> getSubset(int numShards) { return getSubset(numShards, null); } protected  NetworkOrganizer(@NonNull Collection<NetworkInformation> infoSet);  NetworkOrganizer(@NonNull Collection<NetworkInformation> infoSet, String mask);  NetworkOrganizer(@NonNull String networkMask); String getMatchingAddress(); List<String> getSubset(int numShards); List<String> getSubset(int numShards, Collection<String> primary);  }