/* This file is auto-generated from a template (/scripts/templates). If you need to modify it, make sure to modify the template, not this file. */ package org.wikipedia.staticdata; import android.support.annotation.NonNull; import java.util.Collections; import java.util.HashMap; import java.util.Map; public final class {{class_name}} { @NonNull private static final Map DATA_MAP = Collections.unmodifiableMap(newMap()); @NonNull public static String valueFor(String key) { if (DATA_MAP.containsKey(key)) { return DATA_MAP.get(key); } return DATA_MAP.get("en"); } @SuppressWarnings({"checkstyle:methodlength", "SpellCheckingInspection"}) private static Map newMap() { final int size = {{wikis|length}}; Map map = new HashMap<>(size); {%- for wiki in wikis %} map.put("{{wiki.lang}}", "{{wiki.props[key]}}"); {%- endfor %} return map; } private {{class_name}}() { } }