Class ImmutableTrees.ElseIf
java.lang.Object
org.immutables.generator.processor.ImmutableTrees.ElseIf
- All Implemented Interfaces:
Trees.Conditional,Trees.Directive,Trees.DirectiveStart,Trees.ElseIf,Trees.Otherwise,Trees.TemplatePart
- Enclosing class:
ImmutableTrees
Immutable implementation of
Trees.ElseIf.
Use the builder to create immutable instances:
ImmutableTrees.ElseIf.builder().
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forElseIf.static ImmutableTrees.ElseIfcopyOf(Trees.ElseIf instance) Creates an immutable copy of aTrees.ElseIfvalue.booleanThis instance is equal to all instances ofElseIfthat have equal attribute values.private booleanequalTo(int synthetic, ImmutableTrees.ElseIf another) inthashCode()Computes a hash code from attributes:condition.toString()Prints the immutable valueElseIfwith attribute values.final ImmutableTrees.ElseIfwithCondition(Trees.Expression value) Copy the current immutable object by setting a value for theconditionattribute.
-
Field Details
-
condition
-
-
Constructor Details
-
ElseIf
-
-
Method Details
-
condition
- Specified by:
conditionin interfaceTrees.Conditional- Returns:
- The value of the
conditionattribute
-
withCondition
Copy the current immutable object by setting a value for theconditionattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for condition- Returns:
- A modified copy of the
thisobject
-
equals
This instance is equal to all instances ofElseIfthat have equal attribute values. -
equalTo
-
hashCode
public int hashCode()Computes a hash code from attributes:condition. -
toString
Prints the immutable valueElseIfwith attribute values. -
copyOf
Creates an immutable copy of aTrees.ElseIfvalue. 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 ElseIf instance
-
builder
Creates a builder forElseIf.ImmutableTrees.ElseIf.builder() .condition(org.immutables.generator.processor.Trees.Expression) // requiredcondition.build();- Returns:
- A new ElseIf builder
-