Package org.projectnessie.model
Class ImmutableDetached.Builder
- java.lang.Object
-
- org.projectnessie.model.ImmutableDetached.Builder
-
- Enclosing class:
- ImmutableDetached
@NotThreadSafe public static final class ImmutableDetached.Builder extends Object
Builds instances of typeImmutableDetached. 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 ImmutableDetachedbuild()Builds a newImmutableDetached.ImmutableDetached.Builderfrom(Detached instance)Fill a builder with attribute values from the providedorg.projectnessie.model.Detachedinstance.ImmutableDetached.Builderfrom(Reference instance)Fill a builder with attribute values from the providedorg.projectnessie.model.Referenceinstance.ImmutableDetached.Builderhash(String hash)Initializes the value for thehashattribute.ImmutableDetached.Buildermetadata(ReferenceMetadata metadata)Initializes the value for themetadataattribute.
-
-
-
Method Detail
-
from
@CanIgnoreReturnValue public final ImmutableDetached.Builder from(Detached instance)
Fill a builder with attribute values from the providedorg.projectnessie.model.Detachedinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
@CanIgnoreReturnValue public final ImmutableDetached.Builder from(Reference instance)
Fill a builder with attribute values from the providedorg.projectnessie.model.Referenceinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
metadata
@CanIgnoreReturnValue public final ImmutableDetached.Builder metadata(@Nullable ReferenceMetadata metadata)
Initializes the value for themetadataattribute.- Parameters:
metadata- The value for metadata (can benull)- Returns:
thisbuilder for use in a chained invocation
-
hash
@CanIgnoreReturnValue public final ImmutableDetached.Builder hash(String hash)
Initializes the value for thehashattribute.- Parameters:
hash- The value for hash- Returns:
thisbuilder for use in a chained invocation
-
build
public ImmutableDetached build()
Builds a newImmutableDetached.- Returns:
- An immutable instance of Detached
- Throws:
IllegalStateException- if any required attributes are missing
-
-