> + private final String type;
> +
> + Type(String type) {
> + this.type = type;
> + }
> +
> + public String type() {
> + return type;
> + }
> +
> + /**
> + * Used from jclouds builtin deserializer.
> + */
> + public static Type fromValue(String type) {
> + if (type != null) {
> + for (Type value : Type.values()) {
Can this type-string-to-enum map be precalculated somewhere? It should not
change at runtime, and then this code just becomes `return
typeStringsToType.get(type)`.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/339/files#r13035030