Package org.apache.commons.io.monitor

# Class FileAlterationObserver.Builder

java.lang.Object
org.apache.commons.io.build.AbstractSupplier<FileAlterationObserver,FileAlterationObserver.Builder>
org.apache.commons.io.build.AbstractOriginSupplier<FileAlterationObserver,FileAlterationObserver.Builder>
org.apache.commons.io.monitor.FileAlterationObserver.Builder

All Implemented Interfaces:
  `IOSupplier<FileAlterationObserver>`

Enclosing class:
  `FileAlterationObserver`

public static final class FileAlterationObserver.Builder extends AbstractOriginSupplier<FileAlterationObserver,FileAlterationObserver.Builder>
Builds instances of `FileAlterationObserver`.

Since:
  2.18.0

- ## Method Summary

  Modifier and Type
  Method
  Description
  `FileAlterationObserver`
  `get()`
  Gets a new `FileAlterationObserver` instance.
  `FileAlterationObserver.Builder`
  `setFileFilter(FileFilter fileFilter)`
  Sets the file filter or null if none.
  `FileAlterationObserver.Builder`
  `setIOCase(IOCase ioCase)`
  Sets what case sensitivity to use comparing file names, null means system sensitive.
  `FileAlterationObserver.Builder`
  `setRootEntry(FileEntry rootEntry)`
  Sets the root directory to observe.

  ### Methods inherited from class org.apache.commons.io.build.AbstractOriginSupplier

  `checkOrigin, getOrigin, hasOrigin, newByteArrayOrigin, newCharSequenceOrigin, newFileOrigin, newFileOrigin, newInputStreamOrigin, newOutputStreamOrigin, newPathOrigin, newPathOrigin, newRandomAccessFileOrigin, newRandomAccessFileOrigin, newReaderOrigin, newURIOrigin, newWriterOrigin, setByteArray, setCharSequence, setFile, setFile, setInputStream, setOrigin, setOutputStream, setPath, setPath, setRandomAccessFile, setRandomAccessFile, setReader, setURI, setWriter`

  ### Methods inherited from class org.apache.commons.io.build.AbstractSupplier

  `asThis`

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

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

  ### Methods inherited from interface org.apache.commons.io.function.IOSupplier

  `asSupplier, getUnchecked`

- ## Method Details

  - ### get

    public FileAlterationObserver get() throws IOException
    Gets a new `FileAlterationObserver` instance.
    Returns:
      a result.
    Throws:
      `IOException` - if an I/O error occurs converting to an `File` using `AbstractOrigin.getFile()`.
    See Also:
      - `IOSupplier.getUnchecked()`

  - ### setFileFilter

    public FileAlterationObserver.Builder setFileFilter(FileFilter fileFilter)
    Sets the file filter or null if none.
    Parameters:
      `fileFilter` - file filter or null if none.
    Returns:
      This instance.

  - ### setIOCase

    public FileAlterationObserver.Builder setIOCase(IOCase ioCase)
    Sets what case sensitivity to use comparing file names, null means system sensitive.
    Parameters:
      `ioCase` - what case sensitivity to use comparing file names, null means system sensitive.
    Returns:
      This instance.

  - ### setRootEntry

    public FileAlterationObserver.Builder setRootEntry(FileEntry rootEntry)
    Sets the root directory to observe.
    Parameters:
      `rootEntry` - the root directory to observe.
    Returns:
      This instance.