Interface ValueDecoder

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

@API(status=STABLE, since="1.0") @FunctionalInterface public interface ValueDecoder
Interface of configuration property values decoders.
Since:
1.0
Version:
1.0, 2025-05
Author:
(w) Iker Hernaez
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final ValueDecoder
    Default identity configuration property value decoder.
  • Method Summary

    Modifier and Type
    Method
    Description
    default ValueDecoder
    Returns a composed decoder that first applies this decoder to its input, and then applies the after decoder to the result.
    default ValueDecoder
    Returns a composed decoder that first applies the before decoder to its input, and then applies this decoder to the result.
    @Nullable String
    decode(@Nullable String value)
    Decodes the configuration property value.
  • Field Details

    • DEFAULT

      static final ValueDecoder DEFAULT
      Default identity configuration property value decoder.
  • Method Details

    • decode

      @Nullable String decode(@Nullable String value)
      Decodes the configuration property value.
      Parameters:
      value - The configuration property value.
      Returns:
      The decoded configuration property value.
    • compose

      default ValueDecoder compose(ValueDecoder before)
      Returns a composed decoder that first applies the before decoder to its input, and then applies this decoder to the result. If evaluation of either decoder throws an exception, it is relayed to the caller of the composed decoder.
      Parameters:
      before - The decoder to apply before this decoder is applied.
      Returns:
      A composed decoder that first applies the before decoder and then applies this decoder.
      Throws:
      NullPointerException - If before is null;
      See Also:
    • andThen

      default ValueDecoder andThen(ValueDecoder after)
      Returns a composed decoder that first applies this decoder to its input, and then applies the after decoder to the result. If evaluation of either decoder throws an exception, it is relayed to the caller of the composed decoder.
      Parameters:
      after - The decoder to apply after this decoder is applied.
      Returns:
      A composed decoder that first applies this decoder and then applies the after decoder.
      Throws:
      NullPointerException - If after is null.
      See Also: