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 REST - Datacenter (#225)
Date Tue, 15 Dec 2015 21:31:59 GMT
> +    public abstract String href();
> +
> +    public abstract Metadata metadata();
> +
> +    public abstract Properties properties();
> +
> +    public enum Protocol {
> +
> +        TCP, UDP, ICMP, ANY, UNRECOGNIZED;
> +
> +        public static Protocol fromValue(String value) {
> +            try {
> +                return valueOf(value);
> +            } catch (IllegalArgumentException e) {
> +                return UNRECOGNIZED;
> +            }

Use Enums.getIfPresent like in the previous enum or change that one, but make the code consistent
using the same pattern when addressing the same thing.

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