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().

  • Method Details

    • getCommands

      public com.google.common.collect.ImmutableList<AstCommand> getCommands()
      Specified by:
      getCommands in interface AstChangeset.CommandsAndChanges
      Returns:
      The value of the commands attribute
    • getSrc

      public com.google.common.collect.ImmutableList<AstChangeset> getSrc()
      Specified by:
      getSrc in interface AstChangeset.CommandsAndChanges
      Returns:
      The value of the src attribute
    • withCommands

      public final ImmutableCommandsAndChanges withCommands(AstCommand... elements)
      Copy the current immutable object with elements that replace the content of commands.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withCommands

      public final ImmutableCommandsAndChanges withCommands(Iterable<? extends AstCommand> elements)
      Copy the current immutable object with elements that replace the content of commands. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of commands elements to set
      Returns:
      A modified copy of this object
    • withSrc

      public final ImmutableCommandsAndChanges withSrc(AstChangeset... elements)
      Copy the current immutable object with elements that replace the content of src.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withSrc

      public final ImmutableCommandsAndChanges withSrc(Iterable<? extends AstChangeset> elements)
      Copy the current immutable object with elements that replace the content of src. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of src elements to set
      Returns:
      A modified copy of this object
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutableCommandsAndChanges that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: commands, src.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value CommandsAndChanges with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • copyOf

      Creates an immutable copy of a AstChangeset.CommandsAndChanges value. 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

      public static ImmutableCommandsAndChanges.Builder builder()
      Creates a builder for ImmutableCommandsAndChanges.
       ImmutableCommandsAndChanges.builder()
          .addCommands|addAllCommands(io.resys.hdes.client.api.ast.AstCommand) // commands elements
          .addSrc|addAllSrc(io.resys.hdes.client.api.ast.AstChangeset) // src elements
          .build();
       
      Returns:
      A new ImmutableCommandsAndChanges builder