V - is the generic type of the filtered objects.public final class ConstantFilter<V> extends Object implements Filter<V>
Filter that either accepts or rejects all objects to filter.| Modifier and Type | Field and Description |
|---|---|
private static ConstantFilter |
ACCEPT_ALL_FILTER |
private static ConstantFilter |
REJECT_ALL_FILTER |
| Modifier | Constructor and Description |
|---|---|
private |
ConstantFilter()
The constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
accept(V value)
This method determines if the given
value should be accepted. |
static <V> Filter<V> |
getInstance(boolean accept)
This method gets the an instance of this class.
|
private static final ConstantFilter ACCEPT_ALL_FILTER
getInstance(boolean)private static final ConstantFilter REJECT_ALL_FILTER
getInstance(boolean)public boolean accept(V value)
value should be accepted.public static <V> Filter<V> getInstance(boolean accept)
V - is the generic type of the filtered object.accept - - true if the returned Filter should accept all objects, false to
reject all objects.Copyright © 2001–2015 mmm-Team. All rights reserved.