Interface Decoder<T,S>

Type Parameters:
T - the result of the decoding process, the "Target"
S - the input which is decoded, the "Source"
All Superinterfaces:
Component<DecoderKey>, Keyed<DecoderKey>
All Known Subinterfaces:
ConformanceClassDecoder<T,S>, ProcedureDecoder<T,S>
All Known Implementing Classes:
AbstractDelegatingDecoder

public interface Decoder<T,S> extends Component<DecoderKey>
Generic interface for decoders.
Since:
1.0.0
  • Method Summary

    Modifier and Type
    Method
    Description
    decode(S objectToDecode)
    Decode a object to another representation.
    Gets the supported types of this decoder.

    Methods inherited from interface org.n52.janmayen.component.Keyed

    getKeys
  • Method Details

    • decode

      T decode(S objectToDecode) throws DecodingException
      Decode a object to another representation.
      Parameters:
      objectToDecode - the object to encode
      Returns:
      the encoded object
      Throws:
      DecodingException - if an error occurs
    • getSupportedTypes

      default Set<SupportedType> getSupportedTypes()
      Gets the supported types of this decoder.
      Returns:
      the supported key types