Package io.thestencil.client.api
Class ImmutableBatchCommand
- java.lang.Object
-
- io.thestencil.client.api.ImmutableBatchCommand
-
- All Implemented Interfaces:
StencilStore.BatchCommand
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableBatchCommand extends Object implements StencilStore.BatchCommand
Immutable implementation ofStencilStore.BatchCommand.Use the builder to create immutable instances:
ImmutableBatchCommand.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableBatchCommand.BuilderBuilds instances of typeImmutableBatchCommand.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableBatchCommand.Builderbuilder()Creates a builder forImmutableBatchCommand.static ImmutableBatchCommandcopyOf(StencilStore.BatchCommand instance)Creates an immutable copy of aStencilStore.BatchCommandvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableBatchCommandthat have equal attribute values.com.google.common.collect.ImmutableList<StencilClient.Entity>getToBeCreated()com.google.common.collect.ImmutableList<StencilClient.Entity>getToBeDeleted()com.google.common.collect.ImmutableList<StencilClient.Entity>getToBeSaved()inthashCode()Computes a hash code from attributes:toBeCreated,toBeSaved,toBeDeleted.StringtoString()Prints the immutable valueBatchCommandwith attribute values.ImmutableBatchCommandwithToBeCreated(StencilClient.Entity... elements)Copy the current immutable object with elements that replace the content oftoBeCreated.ImmutableBatchCommandwithToBeCreated(Iterable<? extends StencilClient.Entity> elements)Copy the current immutable object with elements that replace the content oftoBeCreated.ImmutableBatchCommandwithToBeDeleted(StencilClient.Entity... elements)Copy the current immutable object with elements that replace the content oftoBeDeleted.ImmutableBatchCommandwithToBeDeleted(Iterable<? extends StencilClient.Entity> elements)Copy the current immutable object with elements that replace the content oftoBeDeleted.ImmutableBatchCommandwithToBeSaved(StencilClient.Entity... elements)Copy the current immutable object with elements that replace the content oftoBeSaved.ImmutableBatchCommandwithToBeSaved(Iterable<? extends StencilClient.Entity> elements)Copy the current immutable object with elements that replace the content oftoBeSaved.
-
-
-
Method Detail
-
getToBeCreated
public com.google.common.collect.ImmutableList<StencilClient.Entity> getToBeCreated()
- Specified by:
getToBeCreatedin interfaceStencilStore.BatchCommand- Returns:
- The value of the
toBeCreatedattribute
-
getToBeSaved
public com.google.common.collect.ImmutableList<StencilClient.Entity> getToBeSaved()
- Specified by:
getToBeSavedin interfaceStencilStore.BatchCommand- Returns:
- The value of the
toBeSavedattribute
-
getToBeDeleted
public com.google.common.collect.ImmutableList<StencilClient.Entity> getToBeDeleted()
- Specified by:
getToBeDeletedin interfaceStencilStore.BatchCommand- Returns:
- The value of the
toBeDeletedattribute
-
withToBeCreated
public final ImmutableBatchCommand withToBeCreated(StencilClient.Entity... elements)
Copy the current immutable object with elements that replace the content oftoBeCreated.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withToBeCreated
public final ImmutableBatchCommand withToBeCreated(Iterable<? extends StencilClient.Entity> elements)
Copy the current immutable object with elements that replace the content oftoBeCreated. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of toBeCreated elements to set- Returns:
- A modified copy of
thisobject
-
withToBeSaved
public final ImmutableBatchCommand withToBeSaved(StencilClient.Entity... elements)
Copy the current immutable object with elements that replace the content oftoBeSaved.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withToBeSaved
public final ImmutableBatchCommand withToBeSaved(Iterable<? extends StencilClient.Entity> elements)
Copy the current immutable object with elements that replace the content oftoBeSaved. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of toBeSaved elements to set- Returns:
- A modified copy of
thisobject
-
withToBeDeleted
public final ImmutableBatchCommand withToBeDeleted(StencilClient.Entity... elements)
Copy the current immutable object with elements that replace the content oftoBeDeleted.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withToBeDeleted
public final ImmutableBatchCommand withToBeDeleted(Iterable<? extends StencilClient.Entity> elements)
Copy the current immutable object with elements that replace the content oftoBeDeleted. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of toBeDeleted elements to set- Returns:
- A modified copy of
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableBatchCommandthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:toBeCreated,toBeSaved,toBeDeleted.
-
toString
public String toString()
Prints the immutable valueBatchCommandwith attribute values.
-
copyOf
public static ImmutableBatchCommand copyOf(StencilStore.BatchCommand instance)
Creates an immutable copy of aStencilStore.BatchCommandvalue. 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 BatchCommand instance
-
builder
public static ImmutableBatchCommand.Builder builder()
Creates a builder forImmutableBatchCommand.ImmutableBatchCommand.builder() .addToBeCreated|addAllToBeCreated(io.thestencil.client.api.StencilClient.Entity) //toBeCreatedelements .addToBeSaved|addAllToBeSaved(io.thestencil.client.api.StencilClient.Entity) //toBeSavedelements .addToBeDeleted|addAllToBeDeleted(io.thestencil.client.api.StencilClient.Entity) //toBeDeletedelements .build();- Returns:
- A new ImmutableBatchCommand builder
-
-