Class ImmutableCamelScheme.Builder

  • Direct Known Subclasses:
    CamelScheme.Builder
    Enclosing class:
    ImmutableCamelScheme

    public static class ImmutableCamelScheme.Builder
    extends Object
    Builds instances of type ImmutableCamelScheme. 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 ImmutableCamelScheme instances.
         new CamelScheme.Builder()
            .id(String) // required id
            .http(boolean) // optional http
            .passive(boolean) // optional passive
            .build();
         
    • Method Detail

      • from

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

        public final CamelScheme.Builder id​(String id)
        Initializes the value for the id attribute.
        Parameters:
        id - The value for id
        Returns:
        this builder for use in a chained invocation
      • http

        public final CamelScheme.Builder http​(boolean http)
        Initializes the value for the http attribute.

        If not set, this attribute will have a default value as returned by the initializer of http.

        Parameters:
        http - The value for http
        Returns:
        this builder for use in a chained invocation
      • passive

        public final CamelScheme.Builder passive​(boolean passive)
        Initializes the value for the passive attribute.

        If not set, this attribute will have a default value as returned by the initializer of passive.

        Parameters:
        passive - The value for passive
        Returns:
        this builder for use in a chained invocation