com.abubusoft.kripton.android.PageChunk Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kripton-android-core Show documentation
Show all versions of kripton-android-core Show documentation
Kripton Persistence Library for Android platform - core module for android modules
package com.abubusoft.kripton.android;
import java.util.List;
public class PageChunk implements Comparable> {
private int pageNumber;
public int getPageNumber() {
return pageNumber;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + pageNumber;
return result;
}
@SuppressWarnings("rawtypes")
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
PageChunk other = (PageChunk) obj;
if (pageNumber != other.pageNumber)
return false;
return true;
}
public List getData() {
return data;
}
private List data;
public PageChunk(int pageNumber, List data) {
this.pageNumber = pageNumber;
this.data = data;
}
@Override
public int compareTo(PageChunk o) {
return this.pageNumber - o.pageNumber;
}
}