Class ImmutableScriptSearch.Builder

  • Enclosing class:
    ImmutableScriptSearch

    @NotThreadSafe
    public static final class ImmutableScriptSearch.Builder
    extends Object
    Builds instances of type ImmutableScriptSearch. Initialize attributes and then invoke the build() method to create an immutable instance.

    Builder is not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.

    • Method Detail

      • from

        @CanIgnoreReturnValue
        public final ImmutableScriptSearch.Builder from​(ScriptSearch instance)
        Fill a builder with attribute values from the provided ScriptSearch instance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values. Collection elements and entries will be added, not replaced.
        Parameters:
        instance - The instance from which to copy values
        Returns:
        this builder for use in a chained invocation
      • directory

        @CanIgnoreReturnValue
        public final ImmutableScriptSearch.Builder directory​(File directory)
        Initializes the value for the directory attribute.
        Parameters:
        directory - The value for directory
        Returns:
        this builder for use in a chained invocation
      • addIncludes

        @CanIgnoreReturnValue
        public final ImmutableScriptSearch.Builder addIncludes​(String element)
        Adds one element to includes list.
        Parameters:
        element - A includes element
        Returns:
        this builder for use in a chained invocation
      • addIncludes

        @CanIgnoreReturnValue
        public final ImmutableScriptSearch.Builder addIncludes​(String... elements)
        Adds elements to includes list.
        Parameters:
        elements - An array of includes elements
        Returns:
        this builder for use in a chained invocation
      • includes

        @CanIgnoreReturnValue
        public final ImmutableScriptSearch.Builder includes​(Iterable<String> elements)
        Sets or replaces all elements for includes list.
        Parameters:
        elements - An iterable of includes elements
        Returns:
        this builder for use in a chained invocation
      • addAllIncludes

        @CanIgnoreReturnValue
        public final ImmutableScriptSearch.Builder addAllIncludes​(Iterable<String> elements)
        Adds elements to includes list.
        Parameters:
        elements - An iterable of includes elements
        Returns:
        this builder for use in a chained invocation
      • addExcludes

        @CanIgnoreReturnValue
        public final ImmutableScriptSearch.Builder addExcludes​(String element)
        Adds one element to excludes list.
        Parameters:
        element - A excludes element
        Returns:
        this builder for use in a chained invocation
      • addExcludes

        @CanIgnoreReturnValue
        public final ImmutableScriptSearch.Builder addExcludes​(String... elements)
        Adds elements to excludes list.
        Parameters:
        elements - An array of excludes elements
        Returns:
        this builder for use in a chained invocation
      • excludes

        @CanIgnoreReturnValue
        public final ImmutableScriptSearch.Builder excludes​(Iterable<String> elements)
        Sets or replaces all elements for excludes list.
        Parameters:
        elements - An iterable of excludes elements
        Returns:
        this builder for use in a chained invocation
      • addAllExcludes

        @CanIgnoreReturnValue
        public final ImmutableScriptSearch.Builder addAllExcludes​(Iterable<String> elements)
        Adds elements to excludes list.
        Parameters:
        elements - An iterable of excludes elements
        Returns:
        this builder for use in a chained invocation