Interface Encoder<TYPE,ENCODED>

Type Parameters:
TYPE - The type to be encoded
ENCODED - The resulting type of encoding
All Known Subinterfaces:
ContentEncoder<TYPE>, ToolResponseEncoder<TYPE>

public interface Encoder<TYPE,ENCODED>
  • Method Summary

    Modifier and Type
    Method
    Description
    encode(TYPE value)
     
    boolean
    supports(Class<?> runtimeType)
     
  • Method Details

    • supports

      boolean supports(Class<?> runtimeType)
      Parameters:
      runtimeType - The runtime class of an object that should be encoded, must not be null
      Returns:
      true if this encoder can encode the provided type, false otherwise
    • encode

      ENCODED encode(TYPE value)
      Parameters:
      value -
      Returns:
      the encoded value