T
- The Generic type of content returned by this Filterpublic interface Filter<T>
extends java.io.Serializable
Modifier and Type | Method and Description |
---|---|
Filter<T> |
and(Filter<?> filter)
Creates an ANDing filter.
|
java.util.List<T> |
filter(java.util.List<?> content)
Filter the input list keeping only the items that match the Filter.
|
T |
filter(java.lang.Object content)
Check to see if the content matches this Filter.
|
boolean |
matches(java.lang.Object content)
Check to see if the object matches a predefined set of rules.
|
Filter<? extends java.lang.Object> |
negate()
Creates an 'inverse' filter
|
Filter<? extends java.lang.Object> |
or(Filter<?> filter)
Creates an ORing filter
|
<R> Filter<R> |
refine(Filter<R> filter)
This is similar to the and(Filter) method except the generic type is
different.
|
java.util.List<T> filter(java.util.List<?> content)
content
- The content to filter.T filter(java.lang.Object content)
content
- The content to test.boolean matches(java.lang.Object content)
content
- The object to verify.true
if the object matches a predfined
set of rules.Filter<? extends java.lang.Object> negate()
Filter<? extends java.lang.Object> or(Filter<?> filter)
filter
- a second Filter to OR with.Filter<T> and(Filter<?> filter)
filter
- a second Filter to AND with.<R> Filter<R> refine(Filter<R> filter)
R
- The Generic type of the returned data is taken from the input
instance.filter
- The filter to refine our results with.Copyright © 2021 Jason Hunter, Brett McLaughlin. All Rights Reserved.