Class ImmutableTrees.SimpleBlock
java.lang.Object
org.immutables.generator.processor.ImmutableTrees.SimpleBlock
- All Implemented Interfaces:
Trees.Block,Trees.SimpleBlock,Trees.TemplatePart
- Enclosing class:
ImmutableTrees
@Immutable
public static final class ImmutableTrees.SimpleBlock
extends Object
implements Trees.SimpleBlock
Immutable implementation of
Trees.SimpleBlock.
Use the builder to create immutable instances:
ImmutableTrees.SimpleBlock.builder().
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final com.google.common.collect.ImmutableList<Trees.TemplatePart> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateSimpleBlock(com.google.common.collect.ImmutableList<Trees.TemplatePart> parts) -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forSimpleBlock.static ImmutableTrees.SimpleBlockcopyOf(Trees.SimpleBlock instance) Creates an immutable copy of aTrees.SimpleBlockvalue.booleanThis instance is equal to all instances ofSimpleBlockthat have equal attribute values.private booleanequalTo(int synthetic, ImmutableTrees.SimpleBlock another) inthashCode()Computes a hash code from attributes:parts.com.google.common.collect.ImmutableList<Trees.TemplatePart> parts()toString()Prints the immutable valueSimpleBlockwith attribute values.withParts(Iterable<? extends Trees.TemplatePart> elements) Copy the current immutable object with elements that replace the content ofparts.withParts(Trees.TemplatePart... elements) Copy the current immutable object with elements that replace the content ofparts.
-
Field Details
-
parts
-
-
Constructor Details
-
SimpleBlock
-
-
Method Details
-
parts
- Specified by:
partsin interfaceTrees.Block- Returns:
- The value of the
partsattribute
-
withParts
Copy the current immutable object with elements that replace the content ofparts.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withParts
Copy the current immutable object with elements that replace the content ofparts. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of parts elements to set- Returns:
- A modified copy of
thisobject
-
equals
This instance is equal to all instances ofSimpleBlockthat have equal attribute values. -
equalTo
-
hashCode
public int hashCode()Computes a hash code from attributes:parts. -
toString
Prints the immutable valueSimpleBlockwith attribute values. -
copyOf
Creates an immutable copy of aTrees.SimpleBlockvalue. 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 SimpleBlock instance
-
builder
Creates a builder forSimpleBlock.ImmutableTrees.SimpleBlock.builder() .addParts|addAllParts(org.immutables.generator.processor.Trees.TemplatePart) //partselements .build();- Returns:
- A new SimpleBlock builder
-