public class

Range

extends Object
implements Parcelable Comparable<T>
java.lang.Object
   ↳ com.pspdfkit.datastructures.Range

Class Overview

Represents a range indexed from 0.

Summary

[Expand]
Inherited Constants
From interface android.os.Parcelable
Fields
public static final Creator<Range> CREATOR Creator for creating the Range object from Parcel.
Public Constructors
Range(int position, int length)
Creates a range.
Range(Parcel source)
Creates a Range object from the provided parcel.
Public Methods
int compareTo(Range other)
int describeContents()
boolean equals(Object o)
int getEndPosition()
Returns the ending index for this range.
int getLength()
Returns length of this range.
int getStartPosition()
Returns starting index of this range.
int hashCode()
String toString()
void writeToParcel(Parcel dest, int flags)
[Expand]
Inherited Methods
From class java.lang.Object
From interface android.os.Parcelable
From interface java.lang.Comparable

Fields

public static final Creator<Range> CREATOR

Creator for creating the Range object from Parcel.

Public Constructors

public Range (int position, int length)

Creates a range.

Parameters
position Position at which to start the range.
length Length of the range.

public Range (Parcel source)

Creates a Range object from the provided parcel.

Parameters
source Parcel to use for extracting range object.

Public Methods

public int compareTo (Range other)

public int describeContents ()

public boolean equals (Object o)

public int getEndPosition ()

Returns the ending index for this range.

Returns
  • Ending index, effectively starting index + length.

public int getLength ()

Returns length of this range.

Returns
  • Length of the range, starting from 0.

public int getStartPosition ()

Returns starting index of this range.

Returns
  • Starting index of the range, starting from 0/

public int hashCode ()

public String toString ()

public void writeToParcel (Parcel dest, int flags)