private static ComponentType getArrow(ArrowConfiguration config) { ComponentType result = arrows.get(config); if (result == null) { result = new ComponentType(config.name(), config); arrows.put(config, result); } return result; }
public ComponentType withPart(ArrowPart part) { checkArrow(); return ComponentType.getArrow(arrowConfiguration.withPart(part)); }
public ComponentType withDotted() { checkArrow(); return ComponentType.getArrow(arrowConfiguration.withDotted()); }
public ComponentType withHead(ArrowHead head) { checkArrow(); return ComponentType.getArrow(arrowConfiguration.withHead(head)); }
public static ComponentType getArrow(ArrowDirection direction) { final ArrowConfiguration config = ArrowConfiguration.withDirection(direction); return getArrow(config); }