Package org.projectnessie.model
Class ImmutableDiffEntry.Builder
- java.lang.Object
-
- org.projectnessie.model.ImmutableDiffEntry.Builder
-
- Enclosing class:
- ImmutableDiffEntry
@NotThreadSafe public static final class ImmutableDiffEntry.Builder extends Object
Builds instances of typeImmutableDiffEntry. 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 ImmutableDiffEntrybuild()Builds a newImmutableDiffEntry.ImmutableDiffEntry.Builderfrom(Content from)Initializes the value for thefromattribute.ImmutableDiffEntry.Builderkey(ContentKey key)Initializes the value for thekeyattribute.ImmutableDiffEntry.Builderto(Content to)Initializes the value for thetoattribute.
-
-
-
Method Detail
-
key
@CanIgnoreReturnValue public final ImmutableDiffEntry.Builder key(ContentKey key)
Initializes the value for thekeyattribute.- Parameters:
key- The value for key- Returns:
thisbuilder for use in a chained invocation
-
from
@CanIgnoreReturnValue public final ImmutableDiffEntry.Builder from(@Nullable Content from)
Initializes the value for thefromattribute.- Parameters:
from- The value for from (can benull)- Returns:
thisbuilder for use in a chained invocation
-
to
@CanIgnoreReturnValue public final ImmutableDiffEntry.Builder to(@Nullable Content to)
Initializes the value for thetoattribute.- Parameters:
to- The value for to (can benull)- Returns:
thisbuilder for use in a chained invocation
-
build
public ImmutableDiffEntry build()
Builds a newImmutableDiffEntry.- Returns:
- An immutable instance of DiffEntry
- Throws:
IllegalStateException- if any required attributes are missing
-
-