Android Open Source - Vispin List Item






From Project

Back to project page Vispin.

License

The source code is released under:

Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. ...

If you think the Android project Vispin 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.jpardogo.vispin.models;
/*from   w w  w .  ja va 2s  .c o m*/
public class ListItem<T> {

    public static final int TYPE_ITEM = 0;
    public static final int TYPE_SECTION = 1;

    private final int type;
    private final T item;
    private final String sectionTitle;

    public ListItem(T item) {
        type = TYPE_ITEM;
        this.item = item;
        sectionTitle = null;
    }

    public ListItem(String sectionTitle) {
        type = TYPE_SECTION;
        item = null;
        this.sectionTitle = sectionTitle;
    }

    public int getType() {
        return type;
    }

    public T getItem() {
        return item;
    }

    public String getSectionTitle() {
        return sectionTitle;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }

        ListItem listItem = (ListItem) o;

        if (type != listItem.type) {
            return false;
        }
        if (item != null ? !item.equals(listItem.item) : listItem.item != null) {
            return false;
        }

        return true;
    }

    @Override
    public int hashCode() {
        int result = type;
        result = 31 * result + (item != null ? item.hashCode() : 0);
        return result;
    }
}




Java Source Code List

com.jpardogo.vispin.ApplicationTest.java
com.jpardogo.vispin.MainActivity.java
com.jpardogo.vispin.VispinApp.java
com.jpardogo.vispin.adapters.BaseAllAdapters.java
com.jpardogo.vispin.adapters.PinInfoWindowAdapter.java
com.jpardogo.vispin.adapters.PinsAdapter.java
com.jpardogo.vispin.adapters.delegates.BaseDelegateAdapter.java
com.jpardogo.vispin.adapters.delegates.DelegateAdapter.java
com.jpardogo.vispin.models.ListItem.java
com.jpardogo.vispin.models.PinInfo.java
com.jpardogo.vispin.ui.MainActivity.java
com.jpardogo.vispin.ui.PinsMapFragment.java
com.jpardogo.vispin.ui.custom.DrawInsetsFrameLayout.java
com.jpardogo.vispin.ui.dialogs.PinsDialogFragment.java
com.jpardogo.vispin.utils.Utils.java