Interface TriBuilder<T,U,V,B extends TriBuilder<T,U,V,B>>

Type Parameters:
T - the type of the first element
U - the type of the second element
V - the type of the third element
B - the concrete builder type for fluent chaining
All Superinterfaces:
BaseBuilder<B>

public interface TriBuilder<T,U,V,B extends TriBuilder<T,U,V,B>> extends BaseBuilder<B>
A builder interface for managing and modifying three related values in a fluent, chainable manner.

The TriBuilder interface extends BaseBuilder and provides access to three distinct elements: the first, second, and third values. It supports modifications through a TriConsumer, allowing you to perform operations on all three elements at once.

See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    Retrieves the first element.
    Retrieves the second element.
    Retrieves the third element.
    default B
    modify(TriConsumer<T,U,V> consumer)
    Applies the provided TriConsumer to the three elements.

    Methods inherited from interface me.croabeast.common.builder.BaseBuilder

    instance
  • Method Details

    • getFirst

      T getFirst()
      Retrieves the first element.
      Returns:
      the first element of type T
    • getSecond

      U getSecond()
      Retrieves the second element.
      Returns:
      the second element of type U
    • getThird

      V getThird()
      Retrieves the third element.
      Returns:
      the third element of type V
    • modify

      default B modify(TriConsumer<T,U,V> consumer)
      Applies the provided TriConsumer to the three elements.

      This method allows you to perform an action on all three values simultaneously. The consumer must not be null. After execution, it returns the builder instance for fluent method chaining.

      Parameters:
      consumer - a TriConsumer that processes the first, second, and third elements
      Returns:
      the current builder instance for further modifications
      Throws:
      NullPointerException - if the consumer is null