public static class

RedactionPreset.Builder

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

Class Overview

A builder for creating RedactionPreset instances.

Summary

Fields
protected Color fillColor
protected final Set<Integer> pages
Public Constructors
Builder(Type presetType)
Create the builder to help construct a RedactionPreset.
Public Methods
RedactionPreset build()
Construct the RedactionPreset with the parameters given to this builder.
RedactionPreset.Builder setFillColor(Color fillColor)
Defines the color of the box used to cover the redacted content.
RedactionPreset.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 (Type presetType)

Create the builder to help construct a RedactionPreset.

Parameters
presetType The preset to used to search for redactions to make.

Public Methods

public RedactionPreset build ()

Construct the RedactionPreset with the parameters given to this builder.

Returns

public RedactionPreset.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 RedactionPreset.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.