Class FilterQueryBuilder<T>

java.lang.Object
com.amilesend.tmdb.client.model.discover.filter.FilterQueryBuilder<T>
Type Parameters:
T - the type

public class FilterQueryBuilder<T> extends Object
Builder to construct a filter string that includes a delimited list of items. This allows for defined predicates (i.e., "and", "or") to further define filter queries.
Example: String providers = new FilterQueryBuilder("netflix", QueryBuilder.Type.ADD).append("hulu").build(); String genres = new FilterQueryBuilder("drama", QueryBuilder.Type.OR).append("horror").build();
  • Constructor Details

  • Method Details

    • append

      public FilterQueryBuilder<T> append(T attribute)
      Appends an attribute value to the list.
      Parameters:
      attribute - the attribute value
      Returns:
      the builder
    • build

      public String build()
      Returns a new delimited string for the filter.
      Returns:
      the list of attributes