Package org.projectnessie.model
Class ImmutablePut.Builder
- java.lang.Object
-
- org.projectnessie.model.ImmutablePut.Builder
-
- Enclosing class:
- ImmutablePut
@NotThreadSafe public static final class ImmutablePut.Builder extends Object
Builds instances of typeImmutablePut. Initialize attributes and then invoke thebuild()method to create an immutable instance.Builderis not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ImmutablePutbuild()Builds a newImmutablePut.ImmutablePut.Buildercontents(Contents contents)Initializes the value for thecontentsattribute.ImmutablePut.BuilderexpectedContents(Contents expectedContents)Initializes the value for theexpectedContentsattribute.ImmutablePut.Builderfrom(Operation instance)Fill a builder with attribute values from the providedorg.projectnessie.model.Operationinstance.ImmutablePut.Builderfrom(Operation.Put instance)Fill a builder with attribute values from the providedorg.projectnessie.model.Operation.Putinstance.ImmutablePut.Builderkey(ContentsKey key)Initializes the value for thekeyattribute.
-
-
-
Method Detail
-
from
@CanIgnoreReturnValue public final ImmutablePut.Builder from(Operation instance)
Fill a builder with attribute values from the providedorg.projectnessie.model.Operationinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
@CanIgnoreReturnValue public final ImmutablePut.Builder from(Operation.Put instance)
Fill a builder with attribute values from the providedorg.projectnessie.model.Operation.Putinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
key
@CanIgnoreReturnValue public final ImmutablePut.Builder key(ContentsKey key)
Initializes the value for thekeyattribute.- Parameters:
key- The value for key- Returns:
thisbuilder for use in a chained invocation
-
contents
@CanIgnoreReturnValue public final ImmutablePut.Builder contents(Contents contents)
Initializes the value for thecontentsattribute.- Parameters:
contents- The value for contents- Returns:
thisbuilder for use in a chained invocation
-
expectedContents
@CanIgnoreReturnValue public final ImmutablePut.Builder expectedContents(@Nullable Contents expectedContents)
Initializes the value for theexpectedContentsattribute.- Parameters:
expectedContents- The value for expectedContents (can benull)- Returns:
thisbuilder for use in a chained invocation
-
build
public ImmutablePut build()
Builds a newImmutablePut.- Returns:
- An immutable instance of Put
- Throws:
IllegalStateException- if any required attributes are missing
-
-