Package io.resys.hdes.client.api.ast
Class ImmutableAstCommandMessage
java.lang.Object
io.resys.hdes.client.api.ast.ImmutableAstCommandMessage
- All Implemented Interfaces:
AstBody.AstCommandMessage,Serializable
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutableAstCommandMessage
extends Object
implements AstBody.AstCommandMessage
Immutable implementation of
AstBody.AstCommandMessage.
Use the builder to create immutable instances:
ImmutableAstCommandMessage.builder().
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableAstCommandMessage. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableAstCommandMessage.static ImmutableAstCommandMessagecopyOf(AstBody.AstCommandMessage instance) Creates an immutable copy of aAstBody.AstCommandMessagevalue.booleanThis instance is equal to all instances ofImmutableAstCommandMessagethat have equal attribute values.intgetLine()getRange()getType()getValue()inthashCode()Computes a hash code from attributes:line,value,type,range.toString()Prints the immutable valueAstCommandMessagewith attribute values.withLine(int value) Copy the current immutable object by setting a value for thelineattribute.withRange(AstBody.AstCommandRange value) Copy the current immutable object by setting a value for therangeattribute.Copy the current immutable object by setting a value for thetypeattribute.Copy the current immutable object by setting a value for thevalueattribute.
-
Method Details
-
getLine
public int getLine()- Specified by:
getLinein interfaceAstBody.AstCommandMessage- Returns:
- The value of the
lineattribute
-
getValue
- Specified by:
getValuein interfaceAstBody.AstCommandMessage- Returns:
- The value of the
valueattribute
-
getType
- Specified by:
getTypein interfaceAstBody.AstCommandMessage- Returns:
- The value of the
typeattribute
-
getRange
- Specified by:
getRangein interfaceAstBody.AstCommandMessage- Returns:
- The value of the
rangeattribute
-
withLine
Copy the current immutable object by setting a value for thelineattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for line- Returns:
- A modified copy of the
thisobject
-
withValue
Copy the current immutable object by setting a value for thevalueattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for value- 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
-
withRange
Copy the current immutable object by setting a value for therangeattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for range (can benull)- Returns:
- A modified copy of the
thisobject
-
equals
This instance is equal to all instances ofImmutableAstCommandMessagethat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:line,value,type,range. -
toString
Prints the immutable valueAstCommandMessagewith attribute values. -
copyOf
Creates an immutable copy of aAstBody.AstCommandMessagevalue. 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 AstCommandMessage instance
-
builder
Creates a builder forImmutableAstCommandMessage.ImmutableAstCommandMessage.builder() .line(int) // requiredline.value(String) // requiredvalue.type(io.resys.hdes.client.api.ast.AstBody.CommandMessageType) // requiredtype.range(io.resys.hdes.client.api.ast.AstBody.AstCommandRange | null) // nullablerange.build();- Returns:
- A new ImmutableAstCommandMessage builder
-