Package io.resys.hdes.client.api.ast
Class ImmutableAstTagValue
java.lang.Object
io.resys.hdes.client.api.ast.ImmutableAstTagValue
- All Implemented Interfaces:
AstTag.AstTagValue
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutableAstTagValue
extends Object
implements AstTag.AstTagValue
Immutable implementation of
AstTag.AstTagValue.
Use the builder to create immutable instances:
ImmutableAstTagValue.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableAstTagValue. -
Method Summary
Modifier and TypeMethodDescriptionstatic ImmutableAstTagValue.Builderbuilder()Creates a builder forImmutableAstTagValue.static ImmutableAstTagValuecopyOf(AstTag.AstTagValue instance) Creates an immutable copy of aAstTag.AstTagValuevalue.booleanThis instance is equal to all instances ofImmutableAstTagValuethat have equal attribute values.com.google.common.collect.ImmutableList<AstCommand>getHash()getId()inthashCode()Computes a hash code from attributes:id,hash,bodyType,commands.toString()Prints the immutable valueAstTagValuewith attribute values.final ImmutableAstTagValuewithBodyType(AstBody.AstBodyType value) Copy the current immutable object by setting a value for thebodyTypeattribute.final ImmutableAstTagValuewithCommands(AstCommand... elements) Copy the current immutable object with elements that replace the content ofcommands.final ImmutableAstTagValuewithCommands(Iterable<? extends AstCommand> elements) Copy the current immutable object with elements that replace the content ofcommands.final ImmutableAstTagValueCopy the current immutable object by setting a value for thehashattribute.final ImmutableAstTagValueCopy the current immutable object by setting a value for theidattribute.
-
Method Details
-
getId
- Specified by:
getIdin interfaceAstTag.AstTagValue- Returns:
- The value of the
idattribute
-
getHash
- Specified by:
getHashin interfaceAstTag.AstTagValue- Returns:
- The value of the
hashattribute
-
getBodyType
- Specified by:
getBodyTypein interfaceAstTag.AstTagValue- Returns:
- The value of the
bodyTypeattribute
-
getCommands
- Specified by:
getCommandsin interfaceAstTag.AstTagValue- Returns:
- The value of the
commandsattribute
-
withId
Copy the current immutable object by setting a value for theidattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for id (can benull)- Returns:
- A modified copy of the
thisobject
-
withHash
Copy the current immutable object by setting a value for thehashattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for hash- Returns:
- A modified copy of the
thisobject
-
withBodyType
Copy the current immutable object by setting a value for thebodyTypeattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for bodyType- Returns:
- A modified copy of the
thisobject
-
withCommands
Copy the current immutable object with elements that replace the content ofcommands.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withCommands
Copy the current immutable object with elements that replace the content ofcommands. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of commands elements to set- Returns:
- A modified copy of
thisobject
-
equals
This instance is equal to all instances ofImmutableAstTagValuethat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:id,hash,bodyType,commands. -
toString
Prints the immutable valueAstTagValuewith attribute values. -
copyOf
Creates an immutable copy of aAstTag.AstTagValuevalue. 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 AstTagValue instance
-
builder
Creates a builder forImmutableAstTagValue.ImmutableAstTagValue.builder() .id(String | null) // nullableid.hash(String) // requiredhash.bodyType(io.resys.hdes.client.api.ast.AstBody.AstBodyType) // requiredbodyType.addCommands|addAllCommands(io.resys.hdes.client.api.ast.AstCommand) //commandselements .build();- Returns:
- A new ImmutableAstTagValue builder
-