Class ComparisonSettings.Builder

java.lang.Object
com.dua3.utility.text.ComparisonSettings.Builder
Enclosing class:
ComparisonSettings

public static class ComparisonSettings.Builder extends Object
A builder class for creating instances of ComparisonSettings.
  • Method Details

    • setFontMapper

      public ComparisonSettings.Builder setFontMapper(Function<String,String> fontMapper)
      Sets the font mapper function used to map font names.
      Parameters:
      fontMapper - the font mapper function to be set
      Returns:
      the Builder object for method chaining
    • setIgnoreCase

      public ComparisonSettings.Builder setIgnoreCase(boolean ignoreCase)
      Sets whether the method should ignore case when comparing texts.
      Parameters:
      ignoreCase - a boolean value indicating whether to ignore case (true) or not (false)
      Returns:
      the Builder object for method chaining
    • setIgnoreFontFamily

      public ComparisonSettings.Builder setIgnoreFontFamily(boolean ignoreFontFamily)
      Sets whether the method should ignore the font family when comparing texts.
      Parameters:
      ignoreFontFamily - a boolean value indicating whether to ignore the font family (true) or not (false)
      Returns:
      the Builder object for method chaining
    • setIgnoreFontSize

      public ComparisonSettings.Builder setIgnoreFontSize(boolean ignoreFontSize)
      Sets whether the method should ignore the font size when comparing texts.
      Parameters:
      ignoreFontSize - a boolean value indicating whether to ignore the font size (true) or not (false)
      Returns:
      the Builder object for method chaining
    • setIgnoreTextColor

      public ComparisonSettings.Builder setIgnoreTextColor(boolean ignoreTextColor)
      Sets whether the method should ignore the text color when comparing texts.
      Parameters:
      ignoreTextColor - a boolean value indicating whether to ignore the text color (true) or not (false)
      Returns:
      the Builder object for method chaining
    • setIgnoreUnderline

      public ComparisonSettings.Builder setIgnoreUnderline(boolean ignoreUnderline)
      Sets whether the method should ignore the underline style when comparing texts.
      Parameters:
      ignoreUnderline - a boolean value indicating whether to ignore the underline style (true) or not (false)
      Returns:
      the Builder object for method chaining
    • setIgnoreStrikeThrough

      public ComparisonSettings.Builder setIgnoreStrikeThrough(boolean ignoreStrikeThrough)
      Sets whether the method should ignore the strike-through style when comparing texts.
      Parameters:
      ignoreStrikeThrough - a boolean value indicating whether to ignore the strike-through style (true) or not (false)
      Returns:
      the Builder object for method chaining
    • setIgnoreBold

      public ComparisonSettings.Builder setIgnoreBold(boolean ignoreBold)
      Sets whether the method should ignore the bold style when comparing texts.
      Parameters:
      ignoreBold - a boolean value indicating whether to ignore the bold style (true) or not (false)
      Returns:
      the Builder object for method chaining
    • setIgnoreItalic

      public ComparisonSettings.Builder setIgnoreItalic(boolean ignoreItalic)
      Sets whether the method should ignore the italic style when comparing texts.
      Parameters:
      ignoreItalic - a boolean value indicating whether to ignore the italic style (true) or not (false)
      Returns:
      the Builder object for method chaining
    • build

      public ComparisonSettings build()
      Builds the ComparisonSettings object with the specified fontMapper and ignore settings.
      Returns:
      the built ComparisonSettings object