jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ignasi Barrera <notificati...@github.com>
Subject Re: [jclouds-labs] Profitbricks IpBlock API (#141)
Date Mon, 02 Mar 2015 14:56:43 GMT
> +import org.jclouds.javax.annotation.Nullable;
> +
> +@AutoValue
> +public abstract class IpBlock {
> +
> +   public abstract String id();
> +
> +   public abstract Location location();
> +
> +   public abstract List<PublicIp> publicIps();
> +
> +   @Nullable
> +   public abstract List<String> ips();
> +
> +   public static IpBlock create(String id, Location location, List<PublicIp> publicIps,
List<String> ips) {
> +      return new AutoValue_IpBlock(id, location, publicIps, ips);

To enforce the immutability of the list, if not null you should pass an `ImmutableList.copyOf(ips)`
to the auto value constructor.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/141/files#r25603429
Mime
View raw message