Class StringFilter


  • public class StringFilter
    extends java.lang.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.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  StringFilter.Strategy
      Defines the filtering strategy.
    • Constructor Summary

      Constructors 
      Constructor Description
      StringFilter​(java.util.List<java.lang.String> filter)
      Creates a new filter to apply on some data.
      StringFilter​(java.util.List<java.lang.String> filter, StringFilter.Strategy strategy)
      Creates a new filter to apply on some data, given a specific strategy (AND, OR).
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean filter​(java.lang.Object data)
      Filters data according to a set of restrictions and a specific strategy.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • StringFilter

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

        public StringFilter​(java.util.List<java.lang.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​(java.lang.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