Project

General

Profile

« Previous | Next » 

Revision 85a5a250

Added by Andreas Müller almost 3 years ago

add byKey method to CondensedDistributionRecipe

View differences:

cdmlib-ext/src/main/java/eu/etaxonomy/cdm/ext/geo/CondensedDistributionRecipe.java
57 57
            return CondensedDistributionConfiguration.NewDefaultInstance();
58 58
        }
59 59
    }
60

  
61
    public CondensedDistributionRecipe byKey(String key) {
62
        if (key == null){
63
            return null;
64
        }else{
65
            for (CondensedDistributionRecipe rec: values()){
66
                if (rec.getKey().equalsIgnoreCase(key)){
67
                    return rec;
68
                }
69
            }
70
        }
71
        return null;
72
    }
60 73
}

Also available in: Unified diff