Package me.croabeast.common.builder
Interface TriBuilder<T,U,V,B extends TriBuilder<T,U,V,B>>
- Type Parameters:
T- the type of the first elementU- the type of the second elementV- the type of the third elementB- the concrete builder type for fluent chaining
- All Superinterfaces:
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
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
Applies the providedTriConsumerto 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- aTriConsumerthat processes the first, second, and third elements- Returns:
- the current builder instance for further modifications
- Throws:
NullPointerException- if the consumer isnull
-