Class StringFilter.Builder<B extends StringFilter.Builder<B>>

Type Parameters:
B - the type of the Builder that is returned
All Implemented Interfaces:
BuilderInterface
Enclosing class:
StringFilter

public static class StringFilter.Builder<B extends StringFilter.Builder<B>> extends Filter.Builder<B>
Inner class implementing a builder pattern to construct a GObject with properties.
  • Constructor Details

    • Builder

      protected Builder()
      Default constructor for a Builder object.
  • Method Details

    • build

      public StringFilter build()
      Finish building the StringFilter object. This will call GObject.withProperties(Type, String[], Value[]) to create a new GObject instance, which is then cast to StringFilter.
      Overrides:
      build in class Filter.Builder<B extends StringFilter.Builder<B>>
      Returns:
      a new instance of StringFilter with the properties that were set in the Builder object.
    • setExpression

      public B setExpression(Expression expression)
      The expression to evaluate on each item to get a string to compare with.
      Parameters:
      expression - the value for the expression property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setIgnoreCase

      public B setIgnoreCase(boolean ignoreCase)
      If matching is case sensitive.
      Parameters:
      ignoreCase - the value for the ignore-case property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setMatchMode

      public B setMatchMode(StringFilterMatchMode matchMode)
      If exact matches are necessary or if substrings are allowed.
      Parameters:
      matchMode - the value for the match-mode property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setSearch

      public B setSearch(String search)
      The search term.
      Parameters:
      search - the value for the search property
      Returns:
      the Builder instance is returned, to allow method chaining