Class ImmutableTrees.IterationGenerator

    • Method Detail

      • withDeclaration

        public final ImmutableTrees.IterationGenerator withDeclaration​(Trees.ValueDeclaration value)
        Copy the current immutable object by setting a value for the declaration attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for declaration
        Returns:
        A modified copy of the this object
      • withFrom

        public final ImmutableTrees.IterationGenerator withFrom​(Trees.Expression value)
        Copy the current immutable object by setting a value for the from attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for from
        Returns:
        A modified copy of the this object
      • withCondition

        public final ImmutableTrees.IterationGenerator withCondition​(com.google.common.base.Optional<? extends Trees.Expression> optional)
        Copy the current immutable object by setting an optional value for the condition attribute. A shallow reference equality check on the optional value is used to prevent copying of the same value by returning this.
        Parameters:
        optional - A value for condition
        Returns:
        A modified copy of this object
      • equals

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

        public int hashCode()
        Computes a hash code from attributes: declaration, from, condition.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        hashCode value
      • toString

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

        public static ImmutableTrees.IterationGenerator.Builder builder()
        Creates a builder for IterationGenerator.
         ImmutableTrees.IterationGenerator.builder()
            .declaration(org.immutables.generator.processor.Trees.ValueDeclaration) // required declaration
            .from(org.immutables.generator.processor.Trees.Expression) // required from
            .condition(org.immutables.generator.processor.Trees.Expression) // optional condition
            .build();
         
        Returns:
        A new IterationGenerator builder