Methods Summary |
---|
public boolean | contains(int pageIndex)Gets whether a page range contains a a given page.
return (pageIndex >= mStart) && (pageIndex <= mEnd);
|
public int | describeContents()
return 0;
|
public boolean | equals(java.lang.Object obj)
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
PageRange other = (PageRange) obj;
if (mEnd != other.mEnd) {
return false;
}
if (mStart != other.mStart) {
return false;
}
return true;
|
public int | getEnd()Gets the end page index (zero based and inclusive).
return mEnd;
|
public int | getSize()Get the size of this range which is the number of
pages it contains.
return mEnd - mStart + 1;
|
public int | getStart()Gets the start page index (zero based and inclusive).
return mStart;
|
public int | hashCode()
final int prime = 31;
int result = 1;
result = prime * result + mEnd;
result = prime * result + mStart;
return result;
|
public java.lang.String | toString()
if (mStart == 0 && mEnd == Integer.MAX_VALUE) {
return "PageRange[<all pages>]";
}
StringBuilder builder = new StringBuilder();
builder.append("PageRange[")
.append(mStart)
.append(" - ")
.append(mEnd)
.append("]");
return builder.toString();
|
public void | writeToParcel(android.os.Parcel parcel, int flags)
parcel.writeInt(mStart);
parcel.writeInt(mEnd);
|