Package io.resys.hdes.client.api
Class ImmutableStoreEntity
java.lang.Object
io.resys.hdes.client.api.ImmutableStoreEntity
- All Implemented Interfaces:
HdesStore.StoreEntity
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutableStoreEntity
extends Object
implements HdesStore.StoreEntity
Immutable implementation of
HdesStore.StoreEntity.
Use the builder to create immutable instances:
ImmutableStoreEntity.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableStoreEntity. -
Method Summary
Modifier and TypeMethodDescriptionstatic ImmutableStoreEntity.Builderbuilder()Creates a builder forImmutableStoreEntity.static ImmutableStoreEntitycopyOf(HdesStore.StoreEntity instance) Creates an immutable copy of aHdesStore.StoreEntityvalue.booleanThis instance is equal to all instances ofImmutableStoreEntitythat have equal attribute values.com.google.common.collect.ImmutableList<AstCommand>getBody()getHash()getId()inthashCode()Computes a hash code from attributes:id,bodyType,hash,body.toString()Prints the immutable valueStoreEntitywith attribute values.final ImmutableStoreEntitywithBody(AstCommand... elements) Copy the current immutable object with elements that replace the content ofbody.final ImmutableStoreEntitywithBody(Iterable<? extends AstCommand> elements) Copy the current immutable object with elements that replace the content ofbody.final ImmutableStoreEntitywithBodyType(AstBody.AstBodyType value) Copy the current immutable object by setting a value for thebodyTypeattribute.final ImmutableStoreEntityCopy the current immutable object by setting a value for thehashattribute.final ImmutableStoreEntityCopy the current immutable object by setting a value for theidattribute.
-
Method Details
-
getId
- Specified by:
getIdin interfaceHdesStore.StoreEntity- Returns:
- The value of the
idattribute
-
getBodyType
- Specified by:
getBodyTypein interfaceHdesStore.StoreEntity- Returns:
- The value of the
bodyTypeattribute
-
getHash
- Specified by:
getHashin interfaceHdesStore.StoreEntity- Returns:
- The value of the
hashattribute
-
getBody
- Specified by:
getBodyin interfaceHdesStore.StoreEntity- Returns:
- The value of the
bodyattribute
-
withId
Copy the current immutable object by setting a value for theidattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for id- Returns:
- A modified copy of the
thisobject
-
withBodyType
Copy the current immutable object by setting a value for thebodyTypeattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for bodyType- Returns:
- A modified copy of the
thisobject
-
withHash
Copy the current immutable object by setting a value for thehashattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for hash- Returns:
- A modified copy of the
thisobject
-
withBody
Copy the current immutable object with elements that replace the content ofbody.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withBody
Copy the current immutable object with elements that replace the content ofbody. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of body elements to set- Returns:
- A modified copy of
thisobject
-
equals
This instance is equal to all instances ofImmutableStoreEntitythat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:id,bodyType,hash,body. -
toString
Prints the immutable valueStoreEntitywith attribute values. -
copyOf
Creates an immutable copy of aHdesStore.StoreEntityvalue. 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 StoreEntity instance
-
builder
Creates a builder forImmutableStoreEntity.ImmutableStoreEntity.builder() .id(String) // requiredid.bodyType(io.resys.hdes.client.api.ast.AstBody.AstBodyType) // requiredbodyType.hash(String) // requiredhash.addBody|addAllBody(io.resys.hdes.client.api.ast.AstCommand) //bodyelements .build();- Returns:
- A new ImmutableStoreEntity builder
-