Package io.dialob.client.api
Class ImmutableStoreState
- java.lang.Object
-
- io.dialob.client.api.ImmutableStoreState
-
- All Implemented Interfaces:
DialobStore.StoreState
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableStoreState extends Object implements DialobStore.StoreState
Immutable implementation ofDialobStore.StoreState.Use the builder to create immutable instances:
ImmutableStoreState.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableStoreState.BuilderBuilds instances of typeImmutableStoreState.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableStoreState.Builderbuilder()Creates a builder forImmutableStoreState.static ImmutableStoreStatecopyOf(DialobStore.StoreState instance)Creates an immutable copy of aDialobStore.StoreStatevalue.booleanequals(Object another)This instance is equal to all instances ofImmutableStoreStatethat have equal attribute values.com.google.common.collect.ImmutableMap<String,DialobStore.StoreEntity>getForms()com.google.common.collect.ImmutableMap<String,DialobStore.StoreEntity>getRevs()com.google.common.collect.ImmutableMap<String,DialobStore.StoreEntity>getTags()inthashCode()Computes a hash code from attributes:revs,forms,tags.StringtoString()Prints the immutable valueStoreStatewith attribute values.ImmutableStoreStatewithForms(Map<String,? extends DialobStore.StoreEntity> entries)Copy the current immutable object by replacing theformsmap with the specified map.ImmutableStoreStatewithRevs(Map<String,? extends DialobStore.StoreEntity> entries)Copy the current immutable object by replacing therevsmap with the specified map.ImmutableStoreStatewithTags(Map<String,? extends DialobStore.StoreEntity> entries)Copy the current immutable object by replacing thetagsmap with the specified map.
-
-
-
Method Detail
-
getRevs
public com.google.common.collect.ImmutableMap<String,DialobStore.StoreEntity> getRevs()
- Specified by:
getRevsin interfaceDialobStore.StoreState- Returns:
- The value of the
revsattribute
-
getForms
public com.google.common.collect.ImmutableMap<String,DialobStore.StoreEntity> getForms()
- Specified by:
getFormsin interfaceDialobStore.StoreState- Returns:
- The value of the
formsattribute
-
getTags
public com.google.common.collect.ImmutableMap<String,DialobStore.StoreEntity> getTags()
- Specified by:
getTagsin interfaceDialobStore.StoreState- Returns:
- The value of the
tagsattribute
-
withRevs
public final ImmutableStoreState withRevs(Map<String,? extends DialobStore.StoreEntity> entries)
Copy the current immutable object by replacing therevsmap with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
entries- The entries to be added to the revs map- Returns:
- A modified copy of
thisobject
-
withForms
public final ImmutableStoreState withForms(Map<String,? extends DialobStore.StoreEntity> entries)
Copy the current immutable object by replacing theformsmap with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
entries- The entries to be added to the forms map- Returns:
- A modified copy of
thisobject
-
withTags
public final ImmutableStoreState withTags(Map<String,? extends DialobStore.StoreEntity> entries)
Copy the current immutable object by replacing thetagsmap with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
entries- The entries to be added to the tags map- Returns:
- A modified copy of
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableStoreStatethat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:revs,forms,tags.
-
toString
public String toString()
Prints the immutable valueStoreStatewith attribute values.
-
copyOf
public static ImmutableStoreState copyOf(DialobStore.StoreState instance)
Creates an immutable copy of aDialobStore.StoreStatevalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable StoreState instance
-
builder
public static ImmutableStoreState.Builder builder()
Creates a builder forImmutableStoreState.ImmutableStoreState.builder() .putRevs|putAllRevs(String => io.dialob.client.api.DialobStore.StoreEntity) //revsmappings .putForms|putAllForms(String => io.dialob.client.api.DialobStore.StoreEntity) //formsmappings .putTags|putAllTags(String => io.dialob.client.api.DialobStore.StoreEntity) //tagsmappings .build();- Returns:
- A new ImmutableStoreState builder
-
-