Interface TokenTransformer

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface TokenTransformer
Token transformer that transforms a list of tokens into another list of tokens.
The transformer can modify the tokens, remove them, or add new tokens.
  • Method Summary

    Modifier and Type
    Method
    Description
    @NotNull @Unmodifiable List<Token>
    transform(@NotNull List<Token> tokens)
    Transforms the given list of tokens into another list of tokens.
    The transformer can modify the tokens, remove them, or add new tokens.
  • Method Details

    • transform

      @NotNull @NotNull @Unmodifiable List<Token> transform(@NotNull @NotNull List<Token> tokens)
      Transforms the given list of tokens into another list of tokens.
      The transformer can modify the tokens, remove them, or add new tokens.
      Parameters:
      tokens - The list of tokens to transform
      Returns:
      The transformed list of tokens
      API Note:
      This method should return an unmodifiable list of tokens