Package org.apache.camel.k.catalog.model
Class ImmutableCamelLoader
java.lang.Object
org.apache.camel.k.catalog.model.ImmutableCamelLoader
- All Implemented Interfaces:
Comparable<Artifact>
,Artifact
,CamelLoader
@Generated("org.immutables.processor.ProxyProcessor")
public final class ImmutableCamelLoader
extends Object
implements CamelLoader
Immutable implementation of
CamelLoader
.
Use the builder to create immutable instances:
new CamelLoader.Builder()
.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic ImmutableCamelLoader
copyOf
(CamelLoader instance) Creates an immutable copy of aCamelLoader
value.boolean
This instance is equal to all instances ofImmutableCamelLoader
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:groupId
,artifactId
,version
.toString()
Prints the immutable valueCamelLoader
with attribute values.final ImmutableCamelLoader
withArtifactId
(String value) Copy the current immutable object by setting a value for theartifactId
attribute.final ImmutableCamelLoader
withDependencies
(Iterable<? extends Artifact> elements) Copy the current immutable object with elements that replace the content ofdependencies
.final ImmutableCamelLoader
withDependencies
(Artifact... elements) Copy the current immutable object with elements that replace the content ofdependencies
.final ImmutableCamelLoader
withGroupId
(String value) Copy the current immutable object by setting a value for thegroupId
attribute.final ImmutableCamelLoader
withLanguages
(Iterable<String> elements) Copy the current immutable object with elements that replace the content oflanguages
.final ImmutableCamelLoader
withLanguages
(String... elements) Copy the current immutable object with elements that replace the content oflanguages
.final ImmutableCamelLoader
withMetadata
(Map<String, ? extends String> entries) Copy the current immutable object by replacing themetadata
map with the specified map.final ImmutableCamelLoader
withVersion
(String value) Copy the current immutable object by setting a present value for the optionalversion
attribute.final ImmutableCamelLoader
withVersion
(Optional<String> optional) Copy the current immutable object by setting an optional value for theversion
attribute.
-
Method Details
-
getGroupId
- Specified by:
getGroupId
in interfaceArtifact
- Returns:
- The value of the
groupId
attribute
-
getArtifactId
- Specified by:
getArtifactId
in interfaceArtifact
- Returns:
- The value of the
artifactId
attribute
-
getVersion
- Specified by:
getVersion
in interfaceArtifact
- Returns:
- The value of the
version
attribute
-
getLanguages
- Specified by:
getLanguages
in interfaceCamelLoader
- Returns:
- The value of the
languages
attribute
-
getDependencies
- Specified by:
getDependencies
in interfaceCamelLoader
- Returns:
- The value of the
dependencies
attribute
-
getMetadata
- Specified by:
getMetadata
in interfaceCamelLoader
- Returns:
- The value of the
metadata
attribute
-
withGroupId
Copy the current immutable object by setting a value for thegroupId
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for groupId- Returns:
- A modified copy of the
this
object
-
withArtifactId
Copy the current immutable object by setting a value for theartifactId
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for artifactId- Returns:
- A modified copy of the
this
object
-
withVersion
Copy the current immutable object by setting a present value for the optionalversion
attribute.- Parameters:
value
- The value for version- Returns:
- A modified copy of
this
object
-
withVersion
Copy the current immutable object by setting an optional value for theversion
attribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis
.- Parameters:
optional
- A value for version- Returns:
- A modified copy of
this
object
-
withLanguages
Copy the current immutable object with elements that replace the content oflanguages
.- Parameters:
elements
- The elements to set- Returns:
- A modified copy of
this
object
-
withLanguages
Copy the current immutable object with elements that replace the content oflanguages
. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
elements
- An iterable of languages elements to set- Returns:
- A modified copy of
this
object
-
withDependencies
Copy the current immutable object with elements that replace the content ofdependencies
.- Parameters:
elements
- The elements to set- Returns:
- A modified copy of
this
object
-
withDependencies
Copy the current immutable object with elements that replace the content ofdependencies
. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
elements
- An iterable of dependencies elements to set- Returns:
- A modified copy of
this
object
-
withMetadata
Copy the current immutable object by replacing themetadata
map with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
entries
- The entries to be added to the metadata map- Returns:
- A modified copy of
this
object
-
equals
This instance is equal to all instances ofImmutableCamelLoader
that have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:groupId
,artifactId
,version
. -
toString
Prints the immutable valueCamelLoader
with attribute values. -
copyOf
Creates an immutable copy of aCamelLoader
value. 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 CamelLoader instance
-