Package io.dialob.client.api
Class ImmutableStoreState.Builder
- java.lang.Object
-
- io.dialob.client.api.ImmutableStoreState.Builder
-
- Enclosing class:
- ImmutableStoreState
@NotThreadSafe public static final class ImmutableStoreState.Builder extends Object
Builds instances of typeImmutableStoreState. 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 ImmutableStoreStatebuild()Builds a newImmutableStoreState.ImmutableStoreState.Builderforms(Map<String,? extends DialobStore.StoreEntity> entries)Sets or replaces all mappings from the specified map as entries for theformsmap.ImmutableStoreState.Builderfrom(DialobStore.StoreState instance)Fill a builder with attribute values from the providedStoreStateinstance.ImmutableStoreState.BuilderputAllForms(Map<String,? extends DialobStore.StoreEntity> entries)Put all mappings from the specified map as entries toformsmap.ImmutableStoreState.BuilderputAllRevs(Map<String,? extends DialobStore.StoreEntity> entries)Put all mappings from the specified map as entries torevsmap.ImmutableStoreState.BuilderputAllTags(Map<String,? extends DialobStore.StoreEntity> entries)Put all mappings from the specified map as entries totagsmap.ImmutableStoreState.BuilderputForms(String key, DialobStore.StoreEntity value)Put one entry to theformsmap.ImmutableStoreState.BuilderputForms(Map.Entry<String,? extends DialobStore.StoreEntity> entry)Put one entry to theformsmap.ImmutableStoreState.BuilderputRevs(String key, DialobStore.StoreEntity value)Put one entry to therevsmap.ImmutableStoreState.BuilderputRevs(Map.Entry<String,? extends DialobStore.StoreEntity> entry)Put one entry to therevsmap.ImmutableStoreState.BuilderputTags(String key, DialobStore.StoreEntity value)Put one entry to thetagsmap.ImmutableStoreState.BuilderputTags(Map.Entry<String,? extends DialobStore.StoreEntity> entry)Put one entry to thetagsmap.ImmutableStoreState.Builderrevs(Map<String,? extends DialobStore.StoreEntity> entries)Sets or replaces all mappings from the specified map as entries for therevsmap.ImmutableStoreState.Buildertags(Map<String,? extends DialobStore.StoreEntity> entries)Sets or replaces all mappings from the specified map as entries for thetagsmap.
-
-
-
Method Detail
-
from
@CanIgnoreReturnValue public final ImmutableStoreState.Builder from(DialobStore.StoreState instance)
Fill a builder with attribute values from the providedStoreStateinstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values. Collection elements and entries will be added, not replaced.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
putRevs
@CanIgnoreReturnValue public final ImmutableStoreState.Builder putRevs(String key, DialobStore.StoreEntity value)
Put one entry to therevsmap.- Parameters:
key- The key in the revs mapvalue- The associated value in the revs map- Returns:
thisbuilder for use in a chained invocation
-
putRevs
@CanIgnoreReturnValue public final ImmutableStoreState.Builder putRevs(Map.Entry<String,? extends DialobStore.StoreEntity> entry)
Put one entry to therevsmap. Nulls are not permitted- Parameters:
entry- The key and value entry- Returns:
thisbuilder for use in a chained invocation
-
revs
@CanIgnoreReturnValue public final ImmutableStoreState.Builder revs(Map<String,? extends DialobStore.StoreEntity> entries)
Sets or replaces all mappings from the specified map as entries for therevsmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the revs map- Returns:
thisbuilder for use in a chained invocation
-
putAllRevs
@CanIgnoreReturnValue public final ImmutableStoreState.Builder putAllRevs(Map<String,? extends DialobStore.StoreEntity> entries)
Put all mappings from the specified map as entries torevsmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the revs map- Returns:
thisbuilder for use in a chained invocation
-
putForms
@CanIgnoreReturnValue public final ImmutableStoreState.Builder putForms(String key, DialobStore.StoreEntity value)
Put one entry to theformsmap.- Parameters:
key- The key in the forms mapvalue- The associated value in the forms map- Returns:
thisbuilder for use in a chained invocation
-
putForms
@CanIgnoreReturnValue public final ImmutableStoreState.Builder putForms(Map.Entry<String,? extends DialobStore.StoreEntity> entry)
Put one entry to theformsmap. Nulls are not permitted- Parameters:
entry- The key and value entry- Returns:
thisbuilder for use in a chained invocation
-
forms
@CanIgnoreReturnValue public final ImmutableStoreState.Builder forms(Map<String,? extends DialobStore.StoreEntity> entries)
Sets or replaces all mappings from the specified map as entries for theformsmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the forms map- Returns:
thisbuilder for use in a chained invocation
-
putAllForms
@CanIgnoreReturnValue public final ImmutableStoreState.Builder putAllForms(Map<String,? extends DialobStore.StoreEntity> entries)
Put all mappings from the specified map as entries toformsmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the forms map- Returns:
thisbuilder for use in a chained invocation
-
putTags
@CanIgnoreReturnValue public final ImmutableStoreState.Builder putTags(String key, DialobStore.StoreEntity value)
Put one entry to thetagsmap.- Parameters:
key- The key in the tags mapvalue- The associated value in the tags map- Returns:
thisbuilder for use in a chained invocation
-
putTags
@CanIgnoreReturnValue public final ImmutableStoreState.Builder putTags(Map.Entry<String,? extends DialobStore.StoreEntity> entry)
Put one entry to thetagsmap. Nulls are not permitted- Parameters:
entry- The key and value entry- Returns:
thisbuilder for use in a chained invocation
-
tags
@CanIgnoreReturnValue public final ImmutableStoreState.Builder tags(Map<String,? extends DialobStore.StoreEntity> entries)
Sets or replaces all mappings from the specified map as entries for thetagsmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the tags map- Returns:
thisbuilder for use in a chained invocation
-
putAllTags
@CanIgnoreReturnValue public final ImmutableStoreState.Builder putAllTags(Map<String,? extends DialobStore.StoreEntity> entries)
Put all mappings from the specified map as entries totagsmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the tags map- Returns:
thisbuilder for use in a chained invocation
-
build
public ImmutableStoreState build()
Builds a newImmutableStoreState.- Returns:
- An immutable instance of StoreState
- Throws:
IllegalStateException- if any required attributes are missing
-
-