Package io.resys.hdes.client.api
Class ImmutableComposerEntity<A extends AstBody>
java.lang.Object
io.resys.hdes.client.api.ImmutableComposerEntity<A>
- All Implemented Interfaces:
HdesComposer.ComposerEntity<A>
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutableComposerEntity<A extends AstBody>
extends Object
implements HdesComposer.ComposerEntity<A>
Immutable implementation of
HdesComposer.ComposerEntity.
Use the builder to create immutable instances:
ImmutableComposerEntity.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classImmutableComposerEntity.Builder<A extends AstBody>Builds instances of typeImmutableComposerEntity. -
Method Summary
Modifier and TypeMethodDescriptionstatic <A extends AstBody>
ImmutableComposerEntity.Builder<A>builder()Creates a builder forImmutableComposerEntity.static <A extends AstBody>
ImmutableComposerEntity<A>copyOf(HdesComposer.ComposerEntity<A> instance) Creates an immutable copy of aHdesComposer.ComposerEntityvalue.booleanThis instance is equal to all instances ofImmutableComposerEntitythat have equal attribute values.com.google.common.collect.ImmutableList<ProgramEnvir.ProgramAssociation>getAst()com.google.common.collect.ImmutableList<ProgramEnvir.ProgramMessage>getId()com.google.common.collect.ImmutableList<ProgramEnvir.ProgramMessage>inthashCode()Computes a hash code from attributes:id,ast,source,warnings,errors,associations,status.toString()Prints the immutable valueComposerEntitywith attribute values.final ImmutableComposerEntity<A>withAssociations(ProgramEnvir.ProgramAssociation... elements) Copy the current immutable object with elements that replace the content ofassociations.final ImmutableComposerEntity<A>withAssociations(Iterable<? extends ProgramEnvir.ProgramAssociation> elements) Copy the current immutable object with elements that replace the content ofassociations.final ImmutableComposerEntity<A>Copy the current immutable object by setting a value for theastattribute.final ImmutableComposerEntity<A>withErrors(ProgramEnvir.ProgramMessage... elements) Copy the current immutable object with elements that replace the content oferrors.final ImmutableComposerEntity<A>withErrors(Iterable<? extends ProgramEnvir.ProgramMessage> elements) Copy the current immutable object with elements that replace the content oferrors.final ImmutableComposerEntity<A>Copy the current immutable object by setting a value for theidattribute.final ImmutableComposerEntity<A>withSource(AstBody.AstSource value) Copy the current immutable object by setting a value for thesourceattribute.final ImmutableComposerEntity<A>Copy the current immutable object by setting a value for thestatusattribute.final ImmutableComposerEntity<A>withWarnings(ProgramEnvir.ProgramMessage... elements) Copy the current immutable object with elements that replace the content ofwarnings.final ImmutableComposerEntity<A>withWarnings(Iterable<? extends ProgramEnvir.ProgramMessage> elements) Copy the current immutable object with elements that replace the content ofwarnings.
-
Method Details
-
getId
- Specified by:
getIdin interfaceHdesComposer.ComposerEntity<A extends AstBody>- Returns:
- The value of the
idattribute
-
getAst
- Specified by:
getAstin interfaceHdesComposer.ComposerEntity<A extends AstBody>- Returns:
- The value of the
astattribute
-
getSource
- Specified by:
getSourcein interfaceHdesComposer.ComposerEntity<A extends AstBody>- Returns:
- The value of the
sourceattribute
-
getWarnings
- Specified by:
getWarningsin interfaceHdesComposer.ComposerEntity<A extends AstBody>- Returns:
- The value of the
warningsattribute
-
getErrors
- Specified by:
getErrorsin interfaceHdesComposer.ComposerEntity<A extends AstBody>- Returns:
- The value of the
errorsattribute
-
getAssociations
- Specified by:
getAssociationsin interfaceHdesComposer.ComposerEntity<A extends AstBody>- Returns:
- The value of the
associationsattribute
-
getStatus
- Specified by:
getStatusin interfaceHdesComposer.ComposerEntity<A extends AstBody>- Returns:
- The value of the
statusattribute
-
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- Returns:
- A modified copy of the
thisobject
-
withAst
Copy the current immutable object by setting a value for theastattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for ast (can benull)- Returns:
- A modified copy of the
thisobject
-
withSource
Copy the current immutable object by setting a value for thesourceattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for source- Returns:
- A modified copy of the
thisobject
-
withWarnings
Copy the current immutable object with elements that replace the content ofwarnings.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withWarnings
public final ImmutableComposerEntity<A> withWarnings(Iterable<? extends ProgramEnvir.ProgramMessage> elements) Copy the current immutable object with elements that replace the content ofwarnings. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of warnings elements to set- Returns:
- A modified copy of
thisobject
-
withErrors
Copy the current immutable object with elements that replace the content oferrors.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withErrors
public final ImmutableComposerEntity<A> withErrors(Iterable<? extends ProgramEnvir.ProgramMessage> elements) Copy the current immutable object with elements that replace the content oferrors. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of errors elements to set- Returns:
- A modified copy of
thisobject
-
withAssociations
public final ImmutableComposerEntity<A> withAssociations(ProgramEnvir.ProgramAssociation... elements) Copy the current immutable object with elements that replace the content ofassociations.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withAssociations
public final ImmutableComposerEntity<A> withAssociations(Iterable<? extends ProgramEnvir.ProgramAssociation> elements) Copy the current immutable object with elements that replace the content ofassociations. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of associations elements to set- Returns:
- A modified copy of
thisobject
-
withStatus
Copy the current immutable object by setting a value for thestatusattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for status- Returns:
- A modified copy of the
thisobject
-
equals
This instance is equal to all instances ofImmutableComposerEntitythat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:id,ast,source,warnings,errors,associations,status. -
toString
Prints the immutable valueComposerEntitywith attribute values. -
copyOf
public static <A extends AstBody> ImmutableComposerEntity<A> copyOf(HdesComposer.ComposerEntity<A> instance) Creates an immutable copy of aHdesComposer.ComposerEntityvalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Type Parameters:
A- generic parameter A- Parameters:
instance- The instance to copy- Returns:
- A copied immutable ComposerEntity instance
-
builder
Creates a builder forImmutableComposerEntity.ImmutableComposerEntity.<A>builder() .id(String) // requiredid.ast(A | null) // nullableast.source(io.resys.hdes.client.api.ast.AstBody.AstSource) // requiredsource.addWarnings|addAllWarnings(io.resys.hdes.client.api.programs.ProgramEnvir.ProgramMessage) //warningselements .addErrors|addAllErrors(io.resys.hdes.client.api.programs.ProgramEnvir.ProgramMessage) //errorselements .addAssociations|addAllAssociations(io.resys.hdes.client.api.programs.ProgramEnvir.ProgramAssociation) //associationselements .status(io.resys.hdes.client.api.programs.ProgramEnvir.ProgramStatus) // requiredstatus.build();- Type Parameters:
A- generic parameter A- Returns:
- A new ImmutableComposerEntity builder
-