Package com.castlabs.sdk.downloader.network

# Class ResponseModifierFilter

java.lang.Object
com.castlabs.sdk.downloader.network.ResponseModifierFilter

public final class ResponseModifierFilter extends Object
Filter used to restrict when a `ResponseModifier` is executed.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static final class`
  `ResponseModifierFilter.Builder`
  Builder for `ResponseModifierFilter` instances.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static ResponseModifierFilter.Builder`
  `builder()`
  Creates a new builder instance.
  `static ResponseModifierFilter`
  `matchAll()`
  Creates a filter that matches every response.
  `boolean`
  `matches(Response response)`
  Checks whether the given response matches this filter.

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

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

- ## Method Details

  - ### matches

    public boolean matches(@NonNull Response response)
    Checks whether the given response matches this filter.
    Parameters:
      `response` - Response under evaluation
    Returns:
      `true` when the filter conditions are satisfied

  - ### matchAll

    @NonNull public static ResponseModifierFilter matchAll()
    Creates a filter that matches every response.
    Returns:
      Filter instance with no restrictions

  - ### builder

    @NonNull public static ResponseModifierFilter.Builder builder()
    Creates a new builder instance.
    Returns:
      Builder for a filter configuration