Back to project page apps-android-commons.
The source code is released under:
Apache License
If you think the Android project apps-android-commons listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package org.wikimedia.commons; //from www .j a va2s . c o m public class License { String key; String template; String url; String name; public License(String key, String template, String url, String name) { if (key == null) { throw new RuntimeException("License.key must not be null"); } if (template == null) { throw new RuntimeException("License.template must not be null"); } this.key = key; this.template = template; this.url = url; this.name = name; } public String getKey() { return key; } public String getTemplate() { return template; } public String getName() { if (name == null) { // hack return getKey(); } else { return name; } } public String getUrl(String language) { if (url == null) { return null; } else { return url.replace("$lang", language); } } }