EditsDraft


public class EditsDraft

Known direct subclasses
MutableEditsDraft

A mutable builder for creating a sequence of draft edit operations.


Represents a read-only sequence of draft edit operations for a PDF document.

Summary

Public methods

boolean
equals(Object other)
int
final @NonNull Pair<@NonNull EditsDraft, @NonNull EditsDraft>
splitAt(int index)

Splits this EditsDraft into two separate drafts at the specified index with bounds [0, index) and [index, n).

Public methods

equals

public boolean equals(Object other)

hashCode

public int hashCode()

splitAt

Added in 1.0.0-alpha19
public final @NonNull Pair<@NonNull EditsDraft, @NonNull EditsDraftsplitAt(int index)

Splits this EditsDraft into two separate drafts at the specified index with bounds [0, index) and [index, n).

Parameters
int index

The position at which to split the operations.

Returns
@NonNull Pair<@NonNull EditsDraft, @NonNull EditsDraft>

A Pair where first is an EditsDraft representing the range [0, index) and second is an EditsDraft representing the range [index, size).

Throws
IllegalArgumentException

if the index is strictly negative or greater than the total number of operations.