Package io.dialob.client.api
Class ImmutableRevisionWrapper.Builder
- java.lang.Object
-
- io.dialob.client.api.ImmutableRevisionWrapper.Builder
-
- Enclosing class:
- ImmutableRevisionWrapper
@NotThreadSafe public static final class ImmutableRevisionWrapper.Builder extends Object
Builds instances of typeImmutableRevisionWrapper. 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 ImmutableRevisionWrapperbuild()Builds a newImmutableRevisionWrapper.ImmutableRevisionWrapper.Builderdocument(DialobDocument.FormRevisionDocument document)Initializes the value for thedocumentattribute.ImmutableRevisionWrapper.Builderfrom(DialobClient.RevisionWrapper instance)Fill a builder with attribute values from the providedRevisionWrapperinstance.ImmutableRevisionWrapper.Buildersource(DialobStore.StoreEntity source)Initializes the value for thesourceattribute.
-
-
-
Method Detail
-
from
@CanIgnoreReturnValue public final ImmutableRevisionWrapper.Builder from(DialobClient.RevisionWrapper instance)
Fill a builder with attribute values from the providedRevisionWrapperinstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
source
@CanIgnoreReturnValue public final ImmutableRevisionWrapper.Builder source(DialobStore.StoreEntity source)
Initializes the value for thesourceattribute.- Parameters:
source- The value for source- Returns:
thisbuilder for use in a chained invocation
-
document
@CanIgnoreReturnValue public final ImmutableRevisionWrapper.Builder document(DialobDocument.FormRevisionDocument document)
Initializes the value for thedocumentattribute.- Parameters:
document- The value for document- Returns:
thisbuilder for use in a chained invocation
-
build
public ImmutableRevisionWrapper build()
Builds a newImmutableRevisionWrapper.- Returns:
- An immutable instance of RevisionWrapper
- Throws:
IllegalStateException- if any required attributes are missing
-
-