Interface Token.Factory<D,T,R extends Token<D,T>>

Type Parameters:
D - the type of source document identifiers
T - the type of token types
R - the type of token objects to be created
Enclosing interface:
Token<D,T>
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 static interface Token.Factory<D,T,R extends Token<D,T>>
Functional interface for the creation of tokens.
  • Method Summary

    Modifier and Type
    Method
    Description
    newInstance(T type, @Opt String text, @Opt Location<D> location)
    Creates a new instance.
  • Method Details

    • newInstance

      R newInstance(T type, @Opt @Opt String text, @Opt @Opt Location<D> location)
      Creates a new instance.
      Parameters:
      type - the token type
      text - the text content, or null if not available
      location - the location, or null if not available
      Returns:
      a new token with the given data