# Class MFileFilter.Builder

java.lang.Object
com.io7m.montarre.api.MFileFilter.Builder

Enclosing class:
  `MFileFilter`

public static final class MFileFilter.Builder extends Object
Builds instances of type `MFileFilter`. 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 Summary

  Modifier and Type
  Method
  Description
  `final MFileFilter.Builder`
  `addAllExcludes(Iterable<? extends Pattern> elements)`
  Adds elements to `excludes` list.
  `final MFileFilter.Builder`
  `addAllIncludes(Iterable<? extends Pattern> elements)`
  Adds elements to `includes` list.
  `final MFileFilter.Builder`
  `addExcludes(Pattern element)`
  Adds one element to `excludes` list.
  `final MFileFilter.Builder`
  `addExcludes(Pattern... elements)`
  Adds elements to `excludes` list.
  `final MFileFilter.Builder`
  `addIncludes(Pattern element)`
  Adds one element to `includes` list.
  `final MFileFilter.Builder`
  `addIncludes(Pattern... elements)`
  Adds elements to `includes` list.
  `MFileFilter`
  `build()`
  Builds a new `MFileFilter`.
  `final MFileFilter.Builder`
  `from(MFileFilterType instance)`
  Fill a builder with attribute values from the provided `MFileFilterType` instance.
  `final MFileFilter.Builder`
  `setExcludes(Iterable<? extends Pattern> elements)`
  Sets or replaces all elements for `excludes` list.
  `final MFileFilter.Builder`
  `setIncludes(Iterable<? extends Pattern> elements)`
  Sets or replaces all elements for `includes` list.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### from

    public final MFileFilter.Builder from(MFileFilterType instance)
    Fill a builder with attribute values from the provided `MFileFilterType` 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

  - ### addIncludes

    public final MFileFilter.Builder addIncludes(Pattern element)
    Adds one element to `includes` list.
    Parameters:
      `element` - A includes element
    Returns:
      `this` builder for use in a chained invocation

  - ### addIncludes

    public final MFileFilter.Builder addIncludes(Pattern... elements)
    Adds elements to `includes` list.
    Parameters:
      `elements` - An array of includes elements
    Returns:
      `this` builder for use in a chained invocation

  - ### setIncludes

    public final MFileFilter.Builder setIncludes(Iterable<? extends Pattern> 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

    public final MFileFilter.Builder addAllIncludes(Iterable<? extends Pattern> elements)
    Adds elements to `includes` list.
    Parameters:
      `elements` - An iterable of includes elements
    Returns:
      `this` builder for use in a chained invocation

  - ### addExcludes

    public final MFileFilter.Builder addExcludes(Pattern element)
    Adds one element to `excludes` list.
    Parameters:
      `element` - A excludes element
    Returns:
      `this` builder for use in a chained invocation

  - ### addExcludes

    public final MFileFilter.Builder addExcludes(Pattern... elements)
    Adds elements to `excludes` list.
    Parameters:
      `elements` - An array of excludes elements
    Returns:
      `this` builder for use in a chained invocation

  - ### setExcludes

    public final MFileFilter.Builder setExcludes(Iterable<? extends Pattern> 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

    public final MFileFilter.Builder addAllExcludes(Iterable<? extends Pattern> elements)
    Adds elements to `excludes` list.
    Parameters:
      `elements` - An iterable of excludes elements
    Returns:
      `this` builder for use in a chained invocation

  - ### build

    public MFileFilter build()
    Builds a new `MFileFilter`.
    Returns:
      An immutable instance of MFileFilter
    Throws:
      `IllegalStateException` - if any required attributes are missing