Interface ToCopyableBuilder<B extends CopyableBuilder<B,T>,T extends ToCopyableBuilder<B,T>>
- Type Parameters:
T- the type that the builder will build (this)B- the builder type
- All Known Implementing Classes:
AttributeMap,RefreshResult
@SdkPublicApi
public interface ToCopyableBuilder<B extends CopyableBuilder<B,T>,T extends ToCopyableBuilder<B,T>>
Implementors of this interface provide a way to get from an instance of T to a
CopyableBuilder. This allows
modification of an otherwise immutable object using the source object as a base.-
Method Summary
Modifier and TypeMethodDescriptiondefault TA convenience method for callingtoBuilder(), updating the returned builder and then callingSdkBuilder.build().Take this object and create a builder that contains all of the current property values of this object.
-
Method Details
-
toBuilder
B toBuilder()Take this object and create a builder that contains all of the current property values of this object.- Returns:
- a builder for type T
-
copy
A convenience method for callingtoBuilder(), updating the returned builder and then callingSdkBuilder.build(). This is useful for making small modifications to the existing object.- Parameters:
modifier- A function that mutates this immutable object using the provided builder.- Returns:
- A new copy of this object with the requested modifications.
-