Package org.projectnessie.model
Class ImmutableHash.Builder
- java.lang.Object
-
- org.projectnessie.model.ImmutableHash.Builder
-
- Enclosing class:
- ImmutableHash
@NotThreadSafe public static final class ImmutableHash.Builder extends Object
Builds instances of typeImmutableHash. 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 ImmutableHashbuild()Builds a newImmutableHash.ImmutableHash.Builderfrom(Hash instance)Fill a builder with attribute values from the providedorg.projectnessie.model.Hashinstance.ImmutableHash.Builderfrom(Reference instance)Fill a builder with attribute values from the providedorg.projectnessie.model.Referenceinstance.ImmutableHash.Buildername(String name)Initializes the value for thenameattribute.
-
-
-
Method Detail
-
from
@CanIgnoreReturnValue public final ImmutableHash.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
-
from
@CanIgnoreReturnValue public final ImmutableHash.Builder from(Hash instance)
Fill a builder with attribute values from the providedorg.projectnessie.model.Hashinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
name
@CanIgnoreReturnValue public final ImmutableHash.Builder name(String name)
Initializes the value for thenameattribute.- Parameters:
name- The value for name- Returns:
thisbuilder for use in a chained invocation
-
build
public ImmutableHash build()
Builds a newImmutableHash.- Returns:
- An immutable instance of Hash
- Throws:
IllegalStateException- if any required attributes are missing
-
-