Interface ToCopyableBuilder<B extends CopyableBuilder<B,​T>,​T extends ToCopyableBuilder<B,​T>>

    • Method Detail

      • toBuilder

        @Nonnull
        B toBuilder()
        Create a new builder ToCopyableBuilder that is initialised with the current state of this object.
        Returns:
        a new builder instance.
      • copy

        @Nonnull
        default T copy​(@Nonnull
                       java.util.function.Consumer<? super B> modifier)
        A convenience method for calling toBuilder(), updating the returned builder and then calling ObjectBuilder.build().
        Parameters:
        modifier - A function that mutates this immutable object using the provided builder.
        Returns:
        A new copy of this object with the requested modifications.