Class ImmutableNetworkDescription.Builder

  • Enclosing class:
    ImmutableNetworkDescription

    @NotThreadSafe
    public static final class ImmutableNetworkDescription.Builder
    extends Object
    Builds instances of type ImmutableNetworkDescription. 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.

    • Method Detail

      • from

        @CanIgnoreReturnValue
        public final ImmutableNetworkDescription.Builder from​(NetworkDescription instance)
        Fill a builder with attribute values from the provided NetworkDescription 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
      • agentGraph

        @CanIgnoreReturnValue
        public final ImmutableNetworkDescription.Builder agentGraph​(AgentGraph agentGraph)
        Initializes the value for the agentGraph attribute.
        Parameters:
        agentGraph - The value for agentGraph
        Returns:
        this builder for use in a chained invocation
      • localAgent

        @CanIgnoreReturnValue
        public final ImmutableNetworkDescription.Builder localAgent​(Agent localAgent)
        Initializes the optional value localAgent to localAgent.
        Parameters:
        localAgent - The value for localAgent
        Returns:
        this builder for chained invocation
      • localAgent

        @CanIgnoreReturnValue
        public final ImmutableNetworkDescription.Builder localAgent​(Optional<? extends Agent> localAgent)
        Initializes the optional value localAgent to localAgent.
        Parameters:
        localAgent - The value for localAgent
        Returns:
        this builder for use in a chained invocation