Class QuickFindOptions

java.lang.Object
io.github.jspinak.brobot.action.basic.find.presets.QuickFindOptions

public final class QuickFindOptions extends Object
Preset configuration for quick pattern matching operations optimized for speed.

This preset is ideal for scenarios where:

  • You need to quickly verify if an element exists on screen
  • Performance is more important than precision
  • The target element has distinct visual characteristics
  • You only need the first occurrence of an element

Default settings:

  • Strategy: FIRST (stops after finding one match)
  • Similarity: 0.7 (allows more variation for faster matching)
  • Capture Image: false (skips screenshot capture for performance)
  • Max Matches: 1 (only processes the first match)

Example usage:


 // Using the preset directly
 PatternFindOptions quickOptions = QuickFindOptions.create();

 // Customizing the preset
 PatternFindOptions customQuick = QuickFindOptions.builder()
     .setSimilarity(0.8) // Override default similarity
     .build();
 
Since:
1.1.0
See Also:
  • Field Details

    • DEFAULT_SIMILARITY

      public static final double DEFAULT_SIMILARITY
      The default similarity threshold for quick finds. Lower than standard to prioritize speed over precision.
      See Also:
  • Method Details

    • create

      public static PatternFindOptions create()
      Creates a QuickFindOptions instance with default settings.
      Returns:
      A PatternFindOptions configured for quick pattern matching
    • builder

      public static PatternFindOptions.Builder builder()
      Creates a pre-configured builder for QuickFindOptions.

      The builder starts with optimized defaults but allows customization of any setting if needed.

      Returns:
      A PatternFindOptions.Builder with quick find defaults