Package io.thestencil.client.api
Class ImmutableEntityState<T extends StencilClient.EntityBody>
- java.lang.Object
-
- io.thestencil.client.api.ImmutableEntityState<T>
-
- All Implemented Interfaces:
StencilConfig.EntityState<T>
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableEntityState<T extends StencilClient.EntityBody> extends Object implements StencilConfig.EntityState<T>
Immutable implementation ofStencilConfig.EntityState.Use the builder to create immutable instances:
ImmutableEntityState.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableEntityState.Builder<T extends StencilClient.EntityBody>Builds instances of typeImmutableEntityState.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <T extends StencilClient.EntityBody>
ImmutableEntityState.Builder<T>builder()Creates a builder forImmutableEntityState.static <T extends StencilClient.EntityBody>
ImmutableEntityState<T>copyOf(StencilConfig.EntityState<T> instance)Creates an immutable copy of aStencilConfig.EntityStatevalue.booleanequals(Object another)This instance is equal to all instances ofImmutableEntityStatethat have equal attribute values.StencilClient.Entity<T>getEntity()io.resys.thena.docdb.api.actions.ObjectsActions.ObjectsResult<io.resys.thena.docdb.api.actions.ObjectsActions.BlobObject>getSrc()inthashCode()Computes a hash code from attributes:src,entity.StringtoString()Prints the immutable valueEntityStatewith attribute values.ImmutableEntityState<T>withEntity(StencilClient.Entity<T> value)Copy the current immutable object by setting a value for theentityattribute.ImmutableEntityState<T>withSrc(io.resys.thena.docdb.api.actions.ObjectsActions.ObjectsResult<io.resys.thena.docdb.api.actions.ObjectsActions.BlobObject> value)Copy the current immutable object by setting a value for thesrcattribute.
-
-
-
Method Detail
-
getSrc
public io.resys.thena.docdb.api.actions.ObjectsActions.ObjectsResult<io.resys.thena.docdb.api.actions.ObjectsActions.BlobObject> getSrc()
- Specified by:
getSrcin interfaceStencilConfig.EntityState<T extends StencilClient.EntityBody>- Returns:
- The value of the
srcattribute
-
getEntity
public StencilClient.Entity<T> getEntity()
- Specified by:
getEntityin interfaceStencilConfig.EntityState<T extends StencilClient.EntityBody>- Returns:
- The value of the
entityattribute
-
withSrc
public final ImmutableEntityState<T> withSrc(io.resys.thena.docdb.api.actions.ObjectsActions.ObjectsResult<io.resys.thena.docdb.api.actions.ObjectsActions.BlobObject> value)
Copy the current immutable object by setting a value for thesrcattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for src- Returns:
- A modified copy of the
thisobject
-
withEntity
public final ImmutableEntityState<T> withEntity(StencilClient.Entity<T> value)
Copy the current immutable object by setting a value for theentityattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for entity- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableEntityStatethat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:src,entity.
-
toString
public String toString()
Prints the immutable valueEntityStatewith attribute values.
-
copyOf
public static <T extends StencilClient.EntityBody> ImmutableEntityState<T> copyOf(StencilConfig.EntityState<T> instance)
Creates an immutable copy of aStencilConfig.EntityStatevalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Type Parameters:
T- generic parameter T- Parameters:
instance- The instance to copy- Returns:
- A copied immutable EntityState instance
-
builder
public static <T extends StencilClient.EntityBody> ImmutableEntityState.Builder<T> builder()
Creates a builder forImmutableEntityState.ImmutableEntityState.<T>builder() .src(io.resys.thena.docdb.api.actions.ObjectsActions.ObjectsResult<io.resys.thena.docdb.api.actions.ObjectsActions.BlobObject>) // requiredsrc.entity(io.thestencil.client.api.StencilClient.Entity<T>) // requiredentity.build();- Type Parameters:
T- generic parameter T- Returns:
- A new ImmutableEntityState builder
-
-