|
Holger's Java API |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.antelmann.util.VerboseFilter.Adapter<T>
public static class VerboseFilter.Adapter<T>
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.antelmann.util.VerboseFilter |
|---|
VerboseFilter.Adapter<T> |
| Field Summary |
|---|
| Fields inherited from interface com.antelmann.util.Filter |
|---|
EXCLUDE_ALL_FILTER, INCLUDE_ALL_FILTER |
| Constructor Summary | |
|---|---|
VerboseFilter.Adapter()
|
|
VerboseFilter.Adapter(Filter<T> filter)
|
|
VerboseFilter.Adapter(Filter<T> filter,
PatternExtractor<? super T,String> messageExtractor)
|
|
VerboseFilter.Adapter(PatternExtractor<? super T,String> messageExtractor)
allows those entries that generate a null message by the extractor |
|
| Method Summary | |
|---|---|
boolean |
accept(T entry)
returns true only if the given entry is accepted by this filter |
static String |
extractMessage(Filter<?> filter,
Object entry)
convenience method to easily extract a rejection message from any filter |
static String |
extractMessage(Filter<?> filter,
Object entry,
String defaultMessage)
convenience method to easily extract a rejection message from any filter |
PatternExtractor<? super T,String> |
getMessageExtractor()
|
String |
getRejectionMessage(T entry)
provides a message telling the caller why a given element is not accepted by this filter |
void |
setMessageExtractor(PatternExtractor<? super T,String> pe)
|
Filter<T> |
unwrap()
returns the embedded instance that this wrapper encloses |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public VerboseFilter.Adapter()
public VerboseFilter.Adapter(Filter<T> filter)
public VerboseFilter.Adapter(PatternExtractor<? super T,String> messageExtractor)
public VerboseFilter.Adapter(Filter<T> filter,
PatternExtractor<? super T,String> messageExtractor)
| Method Detail |
|---|
public PatternExtractor<? super T,String> getMessageExtractor()
public void setMessageExtractor(PatternExtractor<? super T,String> pe)
public boolean accept(T entry)
Filter
accept in interface Filter<T>public Filter<T> unwrap()
Wrapped
unwrap in interface Wrapped<Filter<T>>public String getRejectionMessage(T entry)
VerboseFilter
getRejectionMessage in interface VerboseFilter<T>entry - the element that is to be filtered; the entry may be null (in which case a generic
rejection message is provided
public static String extractMessage(Filter<?> filter,
Object entry)
throws ClassCastException
ClassCastException
public static String extractMessage(Filter<?> filter,
Object entry,
String defaultMessage)
throws ClassCastException
ClassCastException
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||