public static final class ImmutableSubGraph.Builder<T> extends Object
ImmutableSubGraph.
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.
| Modifier and Type | Method and Description |
|---|---|
ImmutableSubGraph<T> |
build()
Builds a new
ImmutableSubGraph. |
ImmutableSubGraph.Builder<T> |
connections(Map<? extends T,? extends T> entries)
Sets or replaces all mappings from the specified map as entries for the
connections map. |
ImmutableSubGraph.Builder<T> |
from(GraphAsDot.SubGraph<T> instance)
Fill a builder with attribute values from the provided
SubGraph instance. |
ImmutableSubGraph.Builder<T> |
putAllConnections(Map<? extends T,? extends T> entries)
Put all mappings from the specified map as entries to
connections map. |
ImmutableSubGraph.Builder<T> |
putConnections(Map.Entry<? extends T,? extends T> entry)
Put one entry to the
connections map. |
ImmutableSubGraph.Builder<T> |
putConnections(T key,
T value)
Put one entry to the
connections map. |
public final ImmutableSubGraph.Builder<T> from(GraphAsDot.SubGraph<T> instance)
SubGraph 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.instance - The instance from which to copy valuesthis builder for use in a chained invocationpublic final ImmutableSubGraph.Builder<T> putConnections(T key, T value)
connections map.key - The key in the connections mapvalue - The associated value in the connections mapthis builder for use in a chained invocationpublic final ImmutableSubGraph.Builder<T> putConnections(Map.Entry<? extends T,? extends T> entry)
connections map. Nulls are not permittedentry - The key and value entrythis builder for use in a chained invocationpublic final ImmutableSubGraph.Builder<T> connections(Map<? extends T,? extends T> entries)
connections map. Nulls are not permittedentries - The entries that will be added to the connections mapthis builder for use in a chained invocationpublic final ImmutableSubGraph.Builder<T> putAllConnections(Map<? extends T,? extends T> entries)
connections map. Nulls are not permittedentries - The entries that will be added to the connections mapthis builder for use in a chained invocationpublic ImmutableSubGraph<T> build()
ImmutableSubGraph.IllegalStateException - if any required attributes are missingCopyright © 2023. All rights reserved.