Class ImmutableTrees.ApplyExpression

java.lang.Object
org.immutables.generator.processor.ImmutableTrees.ApplyExpression
All Implemented Interfaces:
Trees.ApplyExpression, Trees.Expression
Enclosing class:
ImmutableTrees

@Immutable public static final class ImmutableTrees.ApplyExpression extends Object implements Trees.ApplyExpression
Immutable implementation of Trees.ApplyExpression.

Use the builder to create immutable instances: ImmutableTrees.ApplyExpression.builder().

  • Field Details

    • params

      private final com.google.common.collect.ImmutableList<Trees.Expression> params
  • Constructor Details

    • ApplyExpression

      private ApplyExpression(com.google.common.collect.ImmutableList<Trees.Expression> params)
  • Method Details

    • params

      public com.google.common.collect.ImmutableList<Trees.Expression> params()
      Specified by:
      params in interface Trees.ApplyExpression
      Returns:
      The value of the params attribute
    • withParams

      public final ImmutableTrees.ApplyExpression withParams(Trees.Expression... elements)
      Copy the current immutable object with elements that replace the content of params.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withParams

      public final ImmutableTrees.ApplyExpression withParams(Iterable<? extends Trees.Expression> elements)
      Copy the current immutable object with elements that replace the content of params. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of params 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 ApplyExpression that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • equalTo

      private boolean equalTo(int synthetic, ImmutableTrees.ApplyExpression another)
    • hashCode

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

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

      public static ImmutableTrees.ApplyExpression copyOf(Trees.ApplyExpression instance)
      Creates an immutable copy of a Trees.ApplyExpression 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 ApplyExpression instance
    • builder

      public static ImmutableTrees.ApplyExpression.Builder builder()
      Creates a builder for ApplyExpression.
       ImmutableTrees.ApplyExpression.builder()
          .addParams|addAllParams(org.immutables.generator.processor.Trees.Expression) // params elements
          .build();
       
      Returns:
      A new ApplyExpression builder