Class NewlineFilter<T>

All Implemented Interfaces:
LifecycleUser<T>

public class NewlineFilter<T> extends TokenFilter<T>
The newline filter filters out regular unnecessary newlines if there is more than one.
  • Constructor Details

    • NewlineFilter

      public NewlineFilter()
  • Method Details

    • resetState

      public void resetState()
      Description copied from class: TokenFilter
      Resets the filter's state. Does nothing by default.
      Specified by:
      resetState in interface LifecycleUser<T>
      Overrides:
      resetState in class TokenFilter<T>
    • 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>
      Parameters:
      token - The token to check
      Returns:
      true if the given token should be printed