Back to project page res-check.
The source code is released under:
Apache License
If you think the Android project res-check 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 com.harrikirik.rescheck.dto; //w w w . j a v a2 s .c o m import android.text.TextUtils; /** * Bae InfoItem class * Harri Kirik, harri35@gmail.com */ public class InfoItem extends BaseInfoObject implements CategorisedInfoItem { public static final int VERSION_CODE_UNKNOWN = -1; private static final long serialVersionUID = 6766729117231253812L; private String key; private String value; private InfoCategory category; private String description; private int versionCode; public InfoItem(final String key, final String value, final InfoCategory category) { this.key = key; this.value = value; this.category = category; this.versionCode = VERSION_CODE_UNKNOWN; this.description = null; } public String getKey() { return key; } public String getValue() { return value; } public InfoCategory getCategory() { return category; } @Override public void setCategory(InfoCategory category) { this.category = category; } public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } public void setVersionCode(int versionCode) { this.versionCode = versionCode; } public int getVersionCode() { return versionCode; } public boolean hasDetails() { return versionCode > 0 && !TextUtils.isEmpty(description); } @Override public String toPrintableString() { return getKey() + ": " + getValue(); } @Override public String toString() { return super.toString() + " with key: " + getKey() + ", value: " + getValue(); } }