Package io.resys.hdes.client.api
Class ImmutableCreateEntity
java.lang.Object
io.resys.hdes.client.api.ImmutableCreateEntity
- All Implemented Interfaces:
HdesComposer.CreateEntity
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutableCreateEntity
extends Object
implements HdesComposer.CreateEntity
Immutable implementation of
HdesComposer.CreateEntity.
Use the builder to create immutable instances:
ImmutableCreateEntity.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableCreateEntity. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableCreateEntity.static ImmutableCreateEntitycopyOf(HdesComposer.CreateEntity instance) Creates an immutable copy of aHdesComposer.CreateEntityvalue.booleanThis instance is equal to all instances ofImmutableCreateEntitythat have equal attribute values.com.google.common.collect.ImmutableList<AstCommand>getBody()getDesc()getName()getType()inthashCode()Computes a hash code from attributes:name,desc,type,body.toString()Prints the immutable valueCreateEntitywith attribute values.final ImmutableCreateEntitywithBody(AstCommand... elements) Copy the current immutable object with elements that replace the content ofbody.final ImmutableCreateEntitywithBody(Iterable<? extends AstCommand> elements) Copy the current immutable object with elements that replace the content ofbody.final ImmutableCreateEntityCopy the current immutable object by setting a value for thedescattribute.final ImmutableCreateEntityCopy the current immutable object by setting a value for thenameattribute.final ImmutableCreateEntitywithType(AstBody.AstBodyType value) Copy the current immutable object by setting a value for thetypeattribute.
-
Method Details
-
getName
- Specified by:
getNamein interfaceHdesComposer.CreateEntity- Returns:
- The value of the
nameattribute
-
getDesc
- Specified by:
getDescin interfaceHdesComposer.CreateEntity- Returns:
- The value of the
descattribute
-
getType
- Specified by:
getTypein interfaceHdesComposer.CreateEntity- Returns:
- The value of the
typeattribute
-
getBody
- Specified by:
getBodyin interfaceHdesComposer.CreateEntity- Returns:
- The value of the
bodyattribute
-
withName
Copy the current immutable object by setting a value for thenameattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for name (can benull)- Returns:
- A modified copy of the
thisobject
-
withDesc
Copy the current immutable object by setting a value for thedescattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for desc (can benull)- Returns:
- A modified copy of the
thisobject
-
withType
Copy the current immutable object by setting a value for thetypeattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for type- Returns:
- A modified copy of the
thisobject
-
withBody
Copy the current immutable object with elements that replace the content ofbody.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withBody
Copy the current immutable object with elements that replace the content ofbody. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of body elements to set- Returns:
- A modified copy of
thisobject
-
equals
This instance is equal to all instances ofImmutableCreateEntitythat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:name,desc,type,body. -
toString
Prints the immutable valueCreateEntitywith attribute values. -
copyOf
Creates an immutable copy of aHdesComposer.CreateEntityvalue. 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 CreateEntity instance
-
builder
Creates a builder forImmutableCreateEntity.ImmutableCreateEntity.builder() .name(String | null) // nullablename.desc(String | null) // nullabledesc.type(io.resys.hdes.client.api.ast.AstBody.AstBodyType) // requiredtype.addBody|addAllBody(io.resys.hdes.client.api.ast.AstCommand) //bodyelements .build();- Returns:
- A new ImmutableCreateEntity builder
-