Package org.onlab.util
Class StringFilter
- java.lang.Object
-
- org.onlab.util.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.
-
-
-
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 applystrategy
- type of strategy (AND, OR)
-
-