public static class

RedactionRegEx.Builder

extends Object
java.lang.Object
   ↳ com.pspdfkit.api.redaction.description.RedactionRegEx.Builder

Class Overview

A builder for creating RedactionRegEx instances.

Summary

Fields
protected Color fillColor
protected final Set<Integer> pages
Public Constructors
Builder(String regexPattern)
Create the builder to help construct a RedactionRegEx.
Public Methods
RedactionRegEx build()
Construct the RedactionRegEx with the parameters given to this builder.
RedactionRegEx.Builder setFillColor(Color fillColor)
Defines the color of the box used to cover the redacted content.
RedactionRegEx.Builder setPages(int... pages)
Defines the pages to search for content to mark for redaction.
Protected Methods
void setPagesInternal(int[] pages)
To be used internally called from the the definition of setPages(int) in extended class.
[Expand]
Inherited Methods
From class java.lang.Object

Fields

protected Color fillColor

protected final Set<Integer> pages

Public Constructors

public Builder (String regexPattern)

Create the builder to help construct a RedactionRegEx.

Parameters
regexPattern A ICU style regular expression pattern. All regular expression escapes must be double escaped. Note: Text lines end with CRLF (`\r\n`).

Public Methods

public RedactionRegEx build ()

Construct the RedactionRegEx with the parameters given to this builder.

Returns

public RedactionRegEx.Builder setFillColor (Color fillColor)

Defines the color of the box used to cover the redacted content.

Parameters
fillColor A Color used for the box that covers the redacted content.
Returns
  • This builder.

public RedactionRegEx.Builder setPages (int... pages)

Defines the pages to search for content to mark for redaction.

Parameters
pages A variable length argument of ints representing the pages to redact. Page values must be greater or equal to 0.
Returns
  • This builder.

Protected Methods

protected void setPagesInternal (int[] pages)

To be used internally called from the the definition of setPages(int) in extended class.