Package io.resys.hdes.client.api.ast
Class ImmutableCommandsAndChanges
java.lang.Object
io.resys.hdes.client.api.ast.ImmutableCommandsAndChanges
- All Implemented Interfaces:
AstChangeset.CommandsAndChanges
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutableCommandsAndChanges
extends Object
implements AstChangeset.CommandsAndChanges
Immutable implementation of
AstChangeset.CommandsAndChanges.
Use the builder to create immutable instances:
ImmutableCommandsAndChanges.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableCommandsAndChanges. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableCommandsAndChanges.static ImmutableCommandsAndChangescopyOf(AstChangeset.CommandsAndChanges instance) Creates an immutable copy of aAstChangeset.CommandsAndChangesvalue.booleanThis instance is equal to all instances ofImmutableCommandsAndChangesthat have equal attribute values.com.google.common.collect.ImmutableList<AstCommand>com.google.common.collect.ImmutableList<AstChangeset>getSrc()inthashCode()Computes a hash code from attributes:commands,src.toString()Prints the immutable valueCommandsAndChangeswith attribute values.withCommands(AstCommand... elements) Copy the current immutable object with elements that replace the content ofcommands.withCommands(Iterable<? extends AstCommand> elements) Copy the current immutable object with elements that replace the content ofcommands.withSrc(AstChangeset... elements) Copy the current immutable object with elements that replace the content ofsrc.withSrc(Iterable<? extends AstChangeset> elements) Copy the current immutable object with elements that replace the content ofsrc.
-
Method Details
-
getCommands
- Specified by:
getCommandsin interfaceAstChangeset.CommandsAndChanges- Returns:
- The value of the
commandsattribute
-
getSrc
- Specified by:
getSrcin interfaceAstChangeset.CommandsAndChanges- Returns:
- The value of the
srcattribute
-
withCommands
Copy the current immutable object with elements that replace the content ofcommands.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withCommands
Copy the current immutable object with elements that replace the content ofcommands. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of commands elements to set- Returns:
- A modified copy of
thisobject
-
withSrc
Copy the current immutable object with elements that replace the content ofsrc.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withSrc
Copy the current immutable object with elements that replace the content ofsrc. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of src elements to set- Returns:
- A modified copy of
thisobject
-
equals
This instance is equal to all instances ofImmutableCommandsAndChangesthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:commands,src. -
toString
Prints the immutable valueCommandsAndChangeswith attribute values. -
copyOf
Creates an immutable copy of aAstChangeset.CommandsAndChangesvalue. 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 CommandsAndChanges instance
-
builder
Creates a builder forImmutableCommandsAndChanges.ImmutableCommandsAndChanges.builder() .addCommands|addAllCommands(io.resys.hdes.client.api.ast.AstCommand) //commandselements .addSrc|addAllSrc(io.resys.hdes.client.api.ast.AstChangeset) //srcelements .build();- Returns:
- A new ImmutableCommandsAndChanges builder
-