class 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();

}