Class ImmutableCamelCapability.Builder

  • Direct Known Subclasses:
    CamelCapability.Builder
    Enclosing class:
    ImmutableCamelCapability

    public static class ImmutableCamelCapability.Builder
    extends Object
    Builds instances of type ImmutableCamelCapability. Initialize attributes and then invoke the build() method to create an immutable instance.

    Builder is not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.

    • Constructor Detail

      • Builder

        public Builder()
        Creates a builder for ImmutableCamelCapability instances.
         new CamelCapability.Builder()
            .addDependency|addAllDependencies(org.apache.camel.k.tooling.maven.model.Artifact) // dependencies elements
            .build();
         
    • Method Detail

      • from

        public final CamelCapability.Builder from​(CamelCapability instance)
        Fill a builder with attribute values from the provided CamelCapability instance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values. Collection elements and entries will be added, not replaced.
        Parameters:
        instance - The instance from which to copy values
        Returns:
        this builder for use in a chained invocation
      • addDependency

        public final CamelCapability.Builder addDependency​(Artifact element)
        Adds one element to dependencies set.
        Parameters:
        element - A dependencies element
        Returns:
        this builder for use in a chained invocation
      • addDependencies

        public final CamelCapability.Builder addDependencies​(Artifact... elements)
        Adds elements to dependencies set.
        Parameters:
        elements - An array of dependencies elements
        Returns:
        this builder for use in a chained invocation
      • dependencies

        public final CamelCapability.Builder dependencies​(Iterable<? extends Artifact> elements)
        Sets or replaces all elements for dependencies set.
        Parameters:
        elements - An iterable of dependencies elements
        Returns:
        this builder for use in a chained invocation
      • addAllDependencies

        public final CamelCapability.Builder addAllDependencies​(Iterable<? extends Artifact> elements)
        Adds elements to dependencies set.
        Parameters:
        elements - An iterable of dependencies elements
        Returns:
        this builder for use in a chained invocation