Android Open Source - res-check Info Item






From Project

Back to project page res-check.

License

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.

Java Source Code

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();
    }
}




Java Source Code List

com.harrikirik.rescheck.Config.java
com.harrikirik.rescheck.activity.DetailActivity.java
com.harrikirik.rescheck.activity.MainActivity.java
com.harrikirik.rescheck.adapter.InfoAdapter.java
com.harrikirik.rescheck.dto.BaseInfoObject.java
com.harrikirik.rescheck.dto.CategorisedInfoItem.java
com.harrikirik.rescheck.dto.InfoCategory.java
com.harrikirik.rescheck.dto.InfoImageItem.java
com.harrikirik.rescheck.dto.InfoItem.java
com.harrikirik.rescheck.fragment.DetailFragment.java
com.harrikirik.rescheck.fragment.SpecFragment.java
com.harrikirik.rescheck.util.InfoUtil.java
com.harrikirik.rescheck.util.Log.java
com.harrikirik.rescheck.util.Util.java