Class StringFilter


  • public class StringFilter
    extends Object
    Filters content on a given object with String representation. This is carried out through restrictive (AND) or loose (OR) searches. If not provided, strategy defaults to ADD.
    • Constructor Detail

      • StringFilter

        public StringFilter​(List<String> filter)
        Creates a new filter to apply on some data.
        Parameters:
        filter - list with filters to apply
      • StringFilter

        public StringFilter​(List<String> filter,
                            StringFilter.Strategy strategy)
        Creates a new filter to apply on some data, given a specific strategy (AND, OR).
        Parameters:
        filter - list with filters to apply
        strategy - type of strategy (AND, OR)
    • Method Detail

      • filter

        public boolean filter​(Object data)
        Filters data according to a set of restrictions and a specific strategy.
        Parameters:
        data - Object with data to filter
        Returns:
        true if data honours the filters, false otherwise