@Test public void testRangeInvalid() { _thrown.expect(IllegalArgumentException.class); range(Ip.MAX, Ip.ZERO); }
public static @Nonnull IpSpace range(Ip low, Ip high) { checkArgument( low.asLong() <= high.asLong(), "Invalid range: low IP must be <= high IP, but received low=%s and high=%s", low, high); ImmutableList.Builder<Prefix> prefixes = ImmutableList.builder(); collectPrefixes(low, high, prefixes); return AclIpSpace.builder() .thenPermitting(prefixes.build().stream().map(Prefix::toIpSpace)) .build(); }
IpRange { public static @Nonnull IpSpace range(Ip low, Ip high) { checkArgument( low.asLong() <= high.asLong(), "Invalid range: low IP must be <= high IP, but received low=%s and high=%s", low, high); ImmutableList.Builder<Prefix> prefixes = ImmutableList.builder(); collectPrefixes(low, high, prefixes); return AclIpSpace.builder() .thenPermitting(prefixes.build().stream().map(Prefix::toIpSpace)) .build(); } }
IpRange { public static @Nonnull IpSpace range(Ip low, Ip high) { checkArgument( low.asLong() <= high.asLong(), "Invalid range: low IP must be <= high IP, but received low=%s and high=%s", low, high); ImmutableList.Builder<Prefix> prefixes = ImmutableList.builder(); collectPrefixes(low, high, prefixes); return AclIpSpace.builder() .thenPermitting(prefixes.build().stream().map(Prefix::toIpSpace)) .build(); } private  IpRange(); }
IpRange { public static @Nonnull IpSpace range(Ip low, Ip high) { checkArgument( low.asLong() <= high.asLong(), "Invalid range: low IP must be <= high IP, but received low=%s and high=%s", low, high); ImmutableList.Builder<Prefix> prefixes = ImmutableList.builder(); collectPrefixes(low, high, prefixes); return AclIpSpace.builder() .thenPermitting(prefixes.build().stream().map(Prefix::toIpSpace)) .build(); } private  IpRange(); static @Nonnull IpSpace range(Ip low, Ip high); }
IpRange { public static @Nonnull IpSpace range(Ip low, Ip high) { checkArgument( low.asLong() <= high.asLong(), "Invalid range: low IP must be <= high IP, but received low=%s and high=%s", low, high); ImmutableList.Builder<Prefix> prefixes = ImmutableList.builder(); collectPrefixes(low, high, prefixes); return AclIpSpace.builder() .thenPermitting(prefixes.build().stream().map(Prefix::toIpSpace)) .build(); } private  IpRange(); static @Nonnull IpSpace range(Ip low, Ip high);  }