Interface BiBuilder<T,U,B extends BiBuilder<T,U,B>>

Type Parameters:
T - the type of the first value
U - the type of the second value
B - the specific builder type extending this interface
All Superinterfaces:
BaseBuilder<B>

public interface BiBuilder<T,U,B extends BiBuilder<T,U,B>> extends BaseBuilder<B>
Represents a builder that holds two values and supports modification operations.
  • Method Summary

    Modifier and Type
    Method
    Description
    Retrieves the first stored value.
    Retrieves the second stored value.
    default B
    modify(BiConsumer<T,U> consumer)
    Modifies both stored values using the provided bi-consumer function.

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

    instance
  • Method Details

    • getFirst

      T getFirst()
      Retrieves the first stored value.
      Returns:
      the first value
    • getSecond

      U getSecond()
      Retrieves the second stored value.
      Returns:
      the second value
    • modify

      default B modify(BiConsumer<T,U> consumer)
      Modifies both stored values using the provided bi-consumer function.
      Parameters:
      consumer - the function to modify the values
      Returns:
      the builder instance for fluent method calls
      Throws:
      NullPointerException - if the consumer is null