com.io7m.smfj.processing.api

## Class SMFFilterCommandContext

- java.lang.Object
- - com.io7m.smfj.processing.api.SMFFilterCommandContext

- All Implemented Interfaces:
    SMFFilterCommandContextType

      @Generated(value={"Immutables.generator","SMFFilterCommandContextType"})
      public final class SMFFilterCommandContext
      extends Object
      implements SMFFilterCommandContextType

  The context used during filtering.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `SMFFilterCommandContext.Builder` Builds instances of type `SMFFilterCommandContext`.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static SMFFilterCommandContext.Builder` | `builder()` Creates a builder for `SMFFilterCommandContext`.
    `static SMFFilterCommandContext` | `copyOf(SMFFilterCommandContextType instance)` Creates an immutable copy of a `SMFFilterCommandContextType` value.
    `Path` | `currentPath()` The current path.
    `boolean` | `equals(Object another)` This instance is equal to all instances of `SMFFilterCommandContext` that have equal attribute values.
    `int` | `hashCode()` Computes a hash code from attributes: `sourceRoot`, `currentPath`.
    `static SMFFilterCommandContext` | `of(Path sourceRoot, Path currentPath)` Construct a new immutable `SMFFilterCommandContext` instance.
    `Path` | `sourceRoot()` The source root directory.
    `String` | `toString()` Prints the immutable value `SMFFilterCommandContext` with attribute values.
    `SMFFilterCommandContext` | `withCurrentPath(Path value)` Copy the current immutable object by setting a value for the `currentPath` attribute.
    `SMFFilterCommandContext` | `withSourceRoot(Path value)` Copy the current immutable object by setting a value for the `sourceRoot` attribute.

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

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface com.io7m.smfj.processing.api.SMFFilterCommandContextType

      `checkPreconditions, resolvePath`

- - ### Method Detail

    - #### sourceRoot

          public Path sourceRoot()

      The source root directory. If a filter causes files to be open, they must be descendants of this directory.
      Specified by:
        `sourceRoot` in interface `SMFFilterCommandContextType`
      Returns:
        A source root directory

    - #### currentPath

          public Path currentPath()

      The current path. If a filter command specifies a relative path, the path is resolved relative to the current path.
      Specified by:
        `currentPath` in interface `SMFFilterCommandContextType`
      Returns:
        The current path
      See Also:
        `SMFFilterCommandContextType.resolvePath(Path)`

    - #### withSourceRoot

          public final SMFFilterCommandContext withSourceRoot(Path value)

      Copy the current immutable object by setting a value for the `sourceRoot` attribute. A shallow reference equality check is used to prevent copying of the same value by returning `this`.
      Parameters:
        `value` - A new value for sourceRoot
      Returns:
        A modified copy of the `this` object

    - #### withCurrentPath

          public final SMFFilterCommandContext withCurrentPath(Path value)

      Copy the current immutable object by setting a value for the `currentPath` attribute. A shallow reference equality check is used to prevent copying of the same value by returning `this`.
      Parameters:
        `value` - A new value for currentPath
      Returns:
        A modified copy of the `this` object

    - #### equals

          public boolean equals(Object another)

      This instance is equal to all instances of `SMFFilterCommandContext` that have equal attribute values.
      Overrides:
        `equals` in class `Object`
      Returns:
        `true` if `this` is equal to `another` instance

    - #### hashCode

          public int hashCode()

      Computes a hash code from attributes: `sourceRoot`, `currentPath`.
      Overrides:
        `hashCode` in class `Object`
      Returns:
        hashCode value

    - #### toString

          public String toString()

      Prints the immutable value `SMFFilterCommandContext` with attribute values.
      Overrides:
        `toString` in class `Object`
      Returns:
        A string representation of the value

    - #### of

          public static SMFFilterCommandContext of(Path sourceRoot,
                                                   Path currentPath)

      Construct a new immutable `SMFFilterCommandContext` instance.
      Parameters:
        `sourceRoot` - The value for the `sourceRoot` attribute
        `currentPath` - The value for the `currentPath` attribute
      Returns:
        An immutable SMFFilterCommandContext instance

    - #### copyOf

          public static SMFFilterCommandContext copyOf(SMFFilterCommandContextType instance)

      Creates an immutable copy of a `SMFFilterCommandContextType` value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.
      Parameters:
        `instance` - The instance to copy
      Returns:
        A copied immutable SMFFilterCommandContext instance

    - #### builder

          public static SMFFilterCommandContext.Builder builder()

      Creates a builder for `SMFFilterCommandContext`.
      Returns:
        A new SMFFilterCommandContext builder

Copyright © 2017 <code@io7m.com> http://io7m.com