Interface ValueDecorator

All Known Implementing Classes:
VariableResolver
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 ValueDecorator
Interface of configuration property values decorators.
Since:
1.0
Version:
1.0, 2025-05
Author:
(w) Iker Hernaez
  • Field Summary

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

    Modifier and Type
    Method
    Description
    default @NotNull ValueDecorator
    andThen(@NotNull ValueDecorator after)
    Returns a composed decorator that first applies this decorator to its input, and then applies the after decorator to the result.
    default @NotNull ValueDecorator
    compose(@NotNull ValueDecorator before)
    Returns a composed decorator that first applies the before decorator to its input, and then applies this decorator to the result.
    Decorates the configuration property value.
  • Field Details

    • DEFAULT

      static final ValueDecorator DEFAULT
      Default identity configuration property value decorator.
  • Method Details

    • decorate

      String decorate(String value)
      Decorates the configuration property value.
      Parameters:
      value - The configuration property value.
      Returns:
      The decorated configuration property value.
    • compose

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

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