public abstract class StoreElementFilter extends Object implements Filter.TypedFilter<StoreElement>
Usage example: |
Filter.AndFilter<T>, Filter.CombinedFilter<T>, Filter.EqualFilter<T>, Filter.ImpliesFilter<T>, Filter.NotFilter<T>, Filter.OrFilter<T>, Filter.TypedFilter<T>, Filter.Util
Modifier and Type | Field and Description |
---|---|
static StoreElementFilter |
ACCEPT_ALL |
Constructor and Description |
---|
StoreElementFilter() |
StoreElementFilter(Class<StoreElement> type) |
Modifier and Type | Method and Description |
---|---|
static <T extends StoreElement> |
create(Class<T> type) |
static <T extends StoreElement> |
create(Class<T> type,
Filter<StoreElement> filter) |
static StoreElementFilter |
create(Filter<StoreElement> filter) |
static <T> Filter.TypedFilter<T> |
createIncludeFilter(Class<T> type,
Class<? extends T>... includes)
Creates and returns a class based type filter with an additional include filtering of the specified sub classes.
|
StoreElement |
filter(Object element)
Filter the given element and return either an object of this
classes type T or null, if the element does not match the
filter as defined by
Filter.accept(Object) . |
Class<StoreElement> |
getType()
Get the filter type.
|
static StoreElementFilter |
on(Class<? extends StoreElement>... types) |
public static final StoreElementFilter ACCEPT_ALL
public StoreElementFilter()
public StoreElementFilter(Class<StoreElement> type)
@Nullable public StoreElement filter(Object element)
Filter.accept(Object)
.filter
in interface Filter.TypedFilter<StoreElement>
element
- The element to be filtered.@NotNull public Class<StoreElement> getType()
getType
in interface Filter.TypedFilter<StoreElement>
public static <T extends StoreElement> StoreElementFilter create(Class<T> type)
public static <T extends StoreElement> StoreElementFilter create(Class<T> type, Filter<StoreElement> filter)
public static StoreElementFilter create(Filter<StoreElement> filter)
public static StoreElementFilter on(Class<? extends StoreElement>... types)
public static <T> Filter.TypedFilter<T> createIncludeFilter(@NotNull Class<T> type, Class<? extends T>... includes)
T
- Type of the filter.type
- The type to check basically for.includes
- A list of included classes that should not be filtered.Copyright © 2014 e-Spirit AG. All Rights Reserved. Build 5.0_BETA.500