GraphNodeType (char type) { GraphNodeType nodeType = GRAPH_NODE_TYPE_MAP.get(type); if (nodeType == null) throw new IllegalStateException("Illegal char for graph node type: " + type); return nodeType; }