Interface ReplacementFunction


@Incubating public interface ReplacementFunction
Function used to determine the replacement for a character that is not valid per Avro rules.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
    static final ReplacementFunction
     
  • Method Summary

    Modifier and Type
    Method
    Description
    default boolean
    Determine if the supplied character is a valid first character for Avro fullnames.
    default boolean
    Determine if the supplied character is a valid non-first character for Avro fullnames.
    replace(char invalid)
    Determine the replacement string for the invalid character.
  • Field Details

  • Method Details

    • replace

      String replace(char invalid)
      Determine the replacement string for the invalid character.
      Parameters:
      invalid - the invalid character
      Returns:
      the replacement string; may not be null
    • isValidFirstCharacter

      default boolean isValidFirstCharacter(char c)
      Determine if the supplied character is a valid first character for Avro fullnames. Default legal characters are [a-zA-Z_] for the first character.
      Parameters:
      c - the character
      Returns:
      true if the character is a valid first character of an Avro fullname, or false otherwise
    • isValidNonFirstCharacter

      default boolean isValidNonFirstCharacter(char c)
      Determine if the supplied character is a valid non-first character for Avro fullnames. Default legal characters are [a-zA-Z0-9_.] for the non-first character.
      Parameters:
      c - the character
      Returns:
      true if the character is a valid non-first character of an Avro fullname, or false otherwise