Class AttributeListBuilder<A extends IGraphDotAttributeList, Self extends AttributeListBuilder<A,Self>>

java.lang.Object
de.xima.fc.common.graphdot.AttributeListBuilder<A,Self>
Type Parameters:
A - Type of the attribute list that can be built.
Self - Type of the builder sub class.
Direct Known Subclasses:
AttributeListBuilder.BuilderEdge, AttributeListBuilder.BuilderGraph, AttributeListBuilder.BuilderNode, AttributeListBuilder.BuilderSubGraph

public abstract class AttributeListBuilder<A extends IGraphDotAttributeList, Self extends AttributeListBuilder<A,Self>> extends Object
Type safe builder for a list of graphviz dot graph attributes.
Since:
8.2.0
Author:
XIMA MEDIA GmbH
  • Constructor Details

  • Method Details

    • attr

      public final Self attr(EStandardAttribute attribute, Object value)
      Sets a custom attribute.
      Parameters:
      attribute - Type of the attribute.
      value - Value of the attribute.
      Returns:
      This builder instance for chaining method calls.
    • attr

      public final Self attr(String name, Object value)
      Sets a custom attribute.
      Parameters:
      name - Name of the attribute.
      value - Value of the attribute.
      Returns:
      This builder instance for chaining method calls.
    • build

      public final A build()
      Builds a POJO attribute list model with the current attributes.
      Returns:
      A new attribute list.
    • buildList

      public final List<? extends Map.Entry<? extends CharSequence, Object>> buildList()
      Builds a new attribute list with the current settings.
      Returns:
      A new attribute map with the current settings.
    • self

      protected abstract Self self()
    • edge

      public static AttributeListBuilder.BuilderEdge edge()
      Returns:
      A new builder for a set of edge attributes.
    • graph

      public static AttributeListBuilder.BuilderGraph graph()
      Returns:
      A new builder for a set of graph attributes.
    • node

      public static AttributeListBuilder.BuilderNode node()
      Returns:
      A new builder for a set of node attributes.
    • subGraph

      public static AttributeListBuilder.BuilderSubGraph subGraph()
      Returns:
      A new builder for a set of sub graph attributes.