java.lang.Object
io.resys.hdes.client.api.programs.ImmutableProgramWrapper<A,P>
- All Implemented Interfaces:
ProgramEnvir.ProgramWrapper<A,P>
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutableProgramWrapper<A extends AstBody,P extends Program>
extends Object
implements ProgramEnvir.ProgramWrapper<A,P>
Immutable implementation of
ProgramEnvir.ProgramWrapper.
Use the builder to create immutable instances:
ImmutableProgramWrapper.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classImmutableProgramWrapper.Builder<A extends AstBody,P extends Program> Builds instances of typeImmutableProgramWrapper. -
Method Summary
Modifier and TypeMethodDescriptionstatic <A extends AstBody,P extends Program>
ImmutableProgramWrapper.Builder<A,P> builder()Creates a builder forImmutableProgramWrapper.static <A extends AstBody,P extends Program>
ImmutableProgramWrapper<A,P> copyOf(ProgramEnvir.ProgramWrapper<A, P> instance) Creates an immutable copy of aProgramEnvir.ProgramWrappervalue.booleanThis instance is equal to all instances ofImmutableProgramWrapperthat have equal attribute values.com.google.common.collect.ImmutableList<ProgramEnvir.ProgramAssociation>getAst()com.google.common.collect.ImmutableList<ProgramEnvir.ProgramMessage>com.google.common.collect.ImmutableList<TypeDef>getId()getType()com.google.common.collect.ImmutableList<ProgramEnvir.ProgramMessage>inthashCode()Computes a hash code from attributes:id,type,status,warnings,errors,headers,associations,source,ast,program.toString()Prints the immutable valueProgramWrapperwith attribute values.final ImmutableProgramWrapper<A,P> withAssociations(ProgramEnvir.ProgramAssociation... elements) Copy the current immutable object with elements that replace the content ofassociations.final ImmutableProgramWrapper<A,P> withAssociations(Iterable<? extends ProgramEnvir.ProgramAssociation> elements) Copy the current immutable object with elements that replace the content ofassociations.final ImmutableProgramWrapper<A,P> Copy the current immutable object by setting a present value for the optionalastattribute.final ImmutableProgramWrapper<A,P> Copy the current immutable object by setting an optional value for theastattribute.final ImmutableProgramWrapper<A,P> withErrors(ProgramEnvir.ProgramMessage... elements) Copy the current immutable object with elements that replace the content oferrors.final ImmutableProgramWrapper<A,P> withErrors(Iterable<? extends ProgramEnvir.ProgramMessage> elements) Copy the current immutable object with elements that replace the content oferrors.final ImmutableProgramWrapper<A,P> withHeaders(TypeDef... elements) Copy the current immutable object with elements that replace the content ofheaders.final ImmutableProgramWrapper<A,P> withHeaders(Iterable<? extends TypeDef> elements) Copy the current immutable object with elements that replace the content ofheaders.final ImmutableProgramWrapper<A,P> Copy the current immutable object by setting a value for theidattribute.final ImmutableProgramWrapper<A,P> withProgram(Optional<? extends P> optional) Copy the current immutable object by setting an optional value for theprogramattribute.final ImmutableProgramWrapper<A,P> withProgram(P value) Copy the current immutable object by setting a present value for the optionalprogramattribute.final ImmutableProgramWrapper<A,P> withSource(AstBody.AstSource value) Copy the current immutable object by setting a value for thesourceattribute.final ImmutableProgramWrapper<A,P> Copy the current immutable object by setting a value for thestatusattribute.final ImmutableProgramWrapper<A,P> withType(AstBody.AstBodyType value) Copy the current immutable object by setting a value for thetypeattribute.final ImmutableProgramWrapper<A,P> withWarnings(ProgramEnvir.ProgramMessage... elements) Copy the current immutable object with elements that replace the content ofwarnings.final ImmutableProgramWrapper<A,P> withWarnings(Iterable<? extends ProgramEnvir.ProgramMessage> elements) Copy the current immutable object with elements that replace the content ofwarnings.
-
Method Details
-
getId
-
getType
-
getStatus
-
getWarnings
- Specified by:
getWarningsin interfaceProgramEnvir.ProgramWrapper<A extends AstBody,P extends Program> - Returns:
- The value of the
warningsattribute
-
getErrors
-
getHeaders
- Specified by:
getHeadersin interfaceProgramEnvir.ProgramWrapper<A extends AstBody,P extends Program> - Returns:
- The value of the
headersattribute
-
getAssociations
- Specified by:
getAssociationsin interfaceProgramEnvir.ProgramWrapper<A extends AstBody,P extends Program> - Returns:
- The value of the
associationsattribute
-
getSource
-
getAst
-
getProgram
- Specified by:
getProgramin interfaceProgramEnvir.ProgramWrapper<A extends AstBody,P extends Program> - Returns:
- The value of the
programattribute
-
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
-
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
-
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
-
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 ImmutableProgramWrapper<A,P> 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 ImmutableProgramWrapper<A,P> 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
-
withHeaders
Copy the current immutable object with elements that replace the content ofheaders.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withHeaders
Copy the current immutable object with elements that replace the content ofheaders. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of headers elements to set- Returns:
- A modified copy of
thisobject
-
withAssociations
public final ImmutableProgramWrapper<A,P> 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 ImmutableProgramWrapper<A,P> 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
-
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
-
withAst
Copy the current immutable object by setting a present value for the optionalastattribute.- Parameters:
value- The value for ast- Returns:
- A modified copy of
thisobject
-
withAst
Copy the current immutable object by setting an optional value for theastattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for ast- Returns:
- A modified copy of
thisobject
-
withProgram
Copy the current immutable object by setting a present value for the optionalprogramattribute.- Parameters:
value- The value for program- Returns:
- A modified copy of
thisobject
-
withProgram
Copy the current immutable object by setting an optional value for theprogramattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for program- Returns:
- A modified copy of
thisobject
-
equals
This instance is equal to all instances ofImmutableProgramWrapperthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:id,type,status,warnings,errors,headers,associations,source,ast,program. -
toString
Prints the immutable valueProgramWrapperwith attribute values. -
copyOf
public static <A extends AstBody,P extends Program> ImmutableProgramWrapper<A,P> copyOf(ProgramEnvir.ProgramWrapper<A, P> instance) Creates an immutable copy of aProgramEnvir.ProgramWrappervalue. 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 AP- generic parameter P- Parameters:
instance- The instance to copy- Returns:
- A copied immutable ProgramWrapper instance
-
builder
Creates a builder forImmutableProgramWrapper.ImmutableProgramWrapper.<A, P>builder() .id(String) // requiredid.type(io.resys.hdes.client.api.ast.AstBody.AstBodyType) // requiredtype.status(io.resys.hdes.client.api.programs.ProgramEnvir.ProgramStatus) // requiredstatus.addWarnings|addAllWarnings(io.resys.hdes.client.api.programs.ProgramEnvir.ProgramMessage) //warningselements .addErrors|addAllErrors(io.resys.hdes.client.api.programs.ProgramEnvir.ProgramMessage) //errorselements .addHeaders|addAllHeaders(io.resys.hdes.client.api.ast.TypeDef) //headerselements .addAssociations|addAllAssociations(io.resys.hdes.client.api.programs.ProgramEnvir.ProgramAssociation) //associationselements .source(io.resys.hdes.client.api.ast.AstBody.AstSource) // requiredsource.ast(A) // optionalast.program(P) // optionalprogram.build();- Type Parameters:
A- generic parameter AP- generic parameter P- Returns:
- A new ImmutableProgramWrapper builder
-