Interface TokenFilter
- All Known Implementing Classes:
CachingIntervalSet,ChannelFilter,MultiFilter,NewlineFilter
public interface TokenFilter
A token filter is an object that can check if given tokens should be printed
or not.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumA list of the possible channels a token can have. -
Method Summary
Modifier and TypeMethodDescriptionbooleanisTokenAllowed(Token token) Checks if the token should be printed.static TokenFilterjoin(TokenFilter a, TokenFilter b) Joins two arbitrary token filters into a new filter.default voidResets the filter's state.
-
Method Details
-
join
Joins two arbitrary token filters into a new filter. They may be null, regular filters or multi filters and will be joined accordingly. The returned instance is either a or b or a new multi filter containing a, b, or their contents.- Parameters:
a- A token filter. May benull.b- A token filter. May benull.- Returns:
- The joined token filter
-
resetState
default void resetState()Resets the filter's state. Does nothing by default. -
isTokenAllowed
Checks if the token should be printed.- Parameters:
token- The token to check- Returns:
trueif the given token should be printed
-