Package com.pspdfkit.datastructures
Class Range
-
- All Implemented Interfaces:
-
android.os.Parcelable
,java.lang.Comparable
public class Range implements Parcelable, Comparable<T>
Represents a range indexed from 0.
-
-
Field Summary
Fields Modifier and Type Field Description public final static Parcelable.Creator<Range>
CREATOR
public final int
length
-
Method Summary
Modifier and Type Method Description int
getLength()
Returns length of this range. int
getStartPosition()
Returns starting index of this range. int
getEndPosition()
Returns the ending index for this range. int
compareTo(@NonNull() Range other)
int
hashCode()
boolean
equals(Object o)
String
toString()
int
describeContents()
void
writeToParcel(Parcel dest, int flags)
-
-
Method Detail
-
getLength
@IntRange(from = 0) int getLength()
Returns length of this range.
- Returns:
Length of the range, starting from 0.
-
getStartPosition
@IntRange(from = 0) int getStartPosition()
Returns starting index of this range.
- Returns:
Starting index of the range, starting from 0/
-
getEndPosition
@IntRange(from = 0) int getEndPosition()
Returns the ending index for this range.
- Returns:
Ending index, effectively starting index + length.
-
hashCode
int hashCode()
-
describeContents
int describeContents()
-
writeToParcel
void writeToParcel(Parcel dest, int flags)
-
-
-
-