Class ChannelFilter<T extends JobParameters>

All Implemented Interfaces:
LifecycleUser<T>

public class ChannelFilter<T extends JobParameters> extends TokenFilter<T>
The channel filter accepts all tokens that are not from a lexer channel that is on the given list of disallowed channels.
  • Constructor Details

    • ChannelFilter

      public ChannelFilter(EnumSet<TokenChannel> disallowedChannels)
      Creates a new channel filter with the given disallowed channels.
      Parameters:
      disallowedChannels - The disallowed channels
    • ChannelFilter

      public ChannelFilter(TokenChannel disallowedChannel)
      Creates a new channel filter with a single disallowed channel.
      Parameters:
      disallowedChannel - The disallowed channel
  • Method Details

    • isTokenAllowed

      public boolean isTokenAllowed(Token token)
      Description copied from class: TokenFilter
      Checks if the token should be printed.
      Specified by:
      isTokenAllowed in class TokenFilter<T extends JobParameters>
      Parameters:
      token - The token to check
      Returns:
      true if the given token should be printed