Package io.resys.hdes.client.api.ast
Class ImmutableHeaders
java.lang.Object
io.resys.hdes.client.api.ast.ImmutableHeaders
- All Implemented Interfaces:
AstBody.Headers,Serializable
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutableHeaders
extends Object
implements AstBody.Headers
Immutable implementation of
AstBody.Headers.
Use the builder to create immutable instances:
ImmutableHeaders.builder().
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic ImmutableHeaders.Builderbuilder()Creates a builder forImmutableHeaders.static ImmutableHeaderscopyOf(AstBody.Headers instance) Creates an immutable copy of aAstBody.Headersvalue.booleanThis instance is equal to all instances ofImmutableHeadersthat have equal attribute values.com.google.common.collect.ImmutableList<TypeDef>com.google.common.collect.ImmutableList<TypeDef>inthashCode()Computes a hash code from attributes:acceptDefs,returnDefs.toString()Prints the immutable valueHeaderswith attribute values.final ImmutableHeaderswithAcceptDefs(TypeDef... elements) Copy the current immutable object with elements that replace the content ofacceptDefs.final ImmutableHeaderswithAcceptDefs(Iterable<? extends TypeDef> elements) Copy the current immutable object with elements that replace the content ofacceptDefs.final ImmutableHeaderswithReturnDefs(TypeDef... elements) Copy the current immutable object with elements that replace the content ofreturnDefs.final ImmutableHeaderswithReturnDefs(Iterable<? extends TypeDef> elements) Copy the current immutable object with elements that replace the content ofreturnDefs.
-
Method Details
-
getAcceptDefs
- Specified by:
getAcceptDefsin interfaceAstBody.Headers- Returns:
- The value of the
acceptDefsattribute
-
getReturnDefs
- Specified by:
getReturnDefsin interfaceAstBody.Headers- Returns:
- The value of the
returnDefsattribute
-
withAcceptDefs
Copy the current immutable object with elements that replace the content ofacceptDefs.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withAcceptDefs
Copy the current immutable object with elements that replace the content ofacceptDefs. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of acceptDefs elements to set- Returns:
- A modified copy of
thisobject
-
withReturnDefs
Copy the current immutable object with elements that replace the content ofreturnDefs.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withReturnDefs
Copy the current immutable object with elements that replace the content ofreturnDefs. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of returnDefs elements to set- Returns:
- A modified copy of
thisobject
-
equals
This instance is equal to all instances ofImmutableHeadersthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:acceptDefs,returnDefs. -
toString
Prints the immutable valueHeaderswith attribute values. -
copyOf
Creates an immutable copy of aAstBody.Headersvalue. 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 Headers instance
-
builder
Creates a builder forImmutableHeaders.ImmutableHeaders.builder() .addAcceptDefs|addAllAcceptDefs(io.resys.hdes.client.api.ast.TypeDef) //acceptDefselements .addReturnDefs|addAllReturnDefs(io.resys.hdes.client.api.ast.TypeDef) //returnDefselements .build();- Returns:
- A new ImmutableHeaders builder
-