public static final class ImmutableGraphAsDot.Builder<T> extends Object
ImmutableGraphAsDot.
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 |
|---|---|
ImmutableGraphAsDot<T> |
build()
Builds a new
ImmutableGraphAsDot. |
ImmutableGraphAsDot.Builder<T> |
edgeAttributes(BiFunction<T,T,Map<String,String>> edgeAttributes)
Initializes the value for the
edgeAttributes attribute. |
ImmutableGraphAsDot.Builder<T> |
from(GraphAsDot<T> instance)
Fill a builder with attribute values from the provided
GraphAsDot instance. |
ImmutableGraphAsDot.Builder<T> |
label(String label)
Initializes the value for the
label attribute. |
ImmutableGraphAsDot.Builder<T> |
nodeAttributes(Function<T,Map<String,String>> nodeAttributes)
Initializes the value for the
nodeAttributes attribute. |
public final ImmutableGraphAsDot.Builder<T> from(GraphAsDot<T> instance)
GraphAsDot instance.
Regular attribute values will be replaced with those from the given instance.
Absent optional values will not replace present values.instance - The instance from which to copy valuesthis builder for use in a chained invocationpublic final ImmutableGraphAsDot.Builder<T> edgeAttributes(BiFunction<T,T,Map<String,String>> edgeAttributes)
edgeAttributes attribute.
If not set, this attribute will have a default value as returned by the initializer of edgeAttributes.
edgeAttributes - The value for edgeAttributesthis builder for use in a chained invocationpublic final ImmutableGraphAsDot.Builder<T> nodeAttributes(Function<T,Map<String,String>> nodeAttributes)
nodeAttributes attribute.
If not set, this attribute will have a default value as returned by the initializer of nodeAttributes.
nodeAttributes - The value for nodeAttributesthis builder for use in a chained invocationpublic final ImmutableGraphAsDot.Builder<T> label(String label)
label attribute.
If not set, this attribute will have a default value as returned by the initializer of label.
label - The value for labelthis builder for use in a chained invocationpublic ImmutableGraphAsDot<T> build()
ImmutableGraphAsDot.IllegalStateException - if any required attributes are missingCopyright © 2019. All rights reserved.