TextSelection


public final class TextSelection implements Selection


Represents text content that has been selected

Summary

Public constructors

TextSelection(
    @NonNull CharSequence text,
    @NonNull List<@NonNull PdfRect> bounds
)

Public methods

boolean
equals(Object other)
@NonNull List<@NonNull PdfRect>

The PdfRect bounds of this selection.

final @NonNull CharSequence
int
final @NonNull String

Returns text as a String

@NonNull String

Public constructors

TextSelection

Added in 1.0.0-alpha10
public TextSelection(
    @NonNull CharSequence text,
    @NonNull List<@NonNull PdfRect> bounds
)

Public methods

equals

public boolean equals(Object other)

getBounds

public @NonNull List<@NonNull PdfRectgetBounds()

The PdfRect bounds of this selection. May contain multiple PdfRect if this selection spans multiple discrete areas within the PDF. Consider for example any selection spanning multiple pages, or a text selection spanning multiple lines on the same page.

getText

Added in 1.0.0-alpha10
public final @NonNull CharSequence getText()

hashCode

public int hashCode()

textAsString

Added in 1.0.0-alpha10
public final @NonNull String textAsString()

Returns text as a String

toString

public @NonNull String toString()