Back to project page Vispin.
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.
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; } }