@Test public void nullValueToTreeNode() throws Exception { PatchedDefaultMutableTreeNode treeNode = UiHelper.keyValueToTreeNode("key", "VALUE", null, null); assertThat(treeNode).isNotNull(); }
public static PatchedDefaultMutableTreeNode keyValueToTreeNode(String key, Object value, DataSourceApi dataSourceApi, Object rootObject) { if (value instanceof List) { return listToTreeNode(key, (List) value, dataSourceApi, rootObject); } if (value instanceof Map) { return mapToTreeNode(key, (Map) value, dataSourceApi, rootObject); } if (value instanceof GraphNode) { return nodeToTreeNode(key, (GraphNode) value, dataSourceApi); } if (value instanceof GraphRelationship) { return relationshipToTreeNode(key, (GraphRelationship) value, dataSourceApi); } if (value instanceof GraphPath) { return pathToTreeNode(key, (GraphPath) value, dataSourceApi, rootObject); } return objectToTreeNode(key, value, dataSourceApi, rootObject); }
UiHelper { public static PatchedDefaultMutableTreeNode keyValueToTreeNode(String key, Object value, DataSourceApi dataSourceApi, Object rootObject) { if (value instanceof List) { return listToTreeNode(key, (List) value, dataSourceApi, rootObject); } if (value instanceof Map) { return mapToTreeNode(key, (Map) value, dataSourceApi, rootObject); } if (value instanceof GraphNode) { return nodeToTreeNode(key, (GraphNode) value, dataSourceApi); } if (value instanceof GraphRelationship) { return relationshipToTreeNode(key, (GraphRelationship) value, dataSourceApi); } if (value instanceof GraphPath) { return pathToTreeNode(key, (GraphPath) value, dataSourceApi, rootObject); } return objectToTreeNode(key, value, dataSourceApi, rootObject); } }
UiHelper { public static PatchedDefaultMutableTreeNode keyValueToTreeNode(String key, Object value, DataSourceApi dataSourceApi, Object rootObject) { if (value instanceof List) { return listToTreeNode(key, (List) value, dataSourceApi, rootObject); } if (value instanceof Map) { return mapToTreeNode(key, (Map) value, dataSourceApi, rootObject); } if (value instanceof GraphNode) { return nodeToTreeNode(key, (GraphNode) value, dataSourceApi); } if (value instanceof GraphRelationship) { return relationshipToTreeNode(key, (GraphRelationship) value, dataSourceApi); } if (value instanceof GraphPath) { return pathToTreeNode(key, (GraphPath) value, dataSourceApi, rootObject); } return objectToTreeNode(key, value, dataSourceApi, rootObject); } private  UiHelper(); }
UiHelper { public static PatchedDefaultMutableTreeNode keyValueToTreeNode(String key, Object value, DataSourceApi dataSourceApi, Object rootObject) { if (value instanceof List) { return listToTreeNode(key, (List) value, dataSourceApi, rootObject); } if (value instanceof Map) { return mapToTreeNode(key, (Map) value, dataSourceApi, rootObject); } if (value instanceof GraphNode) { return nodeToTreeNode(key, (GraphNode) value, dataSourceApi); } if (value instanceof GraphRelationship) { return relationshipToTreeNode(key, (GraphRelationship) value, dataSourceApi); } if (value instanceof GraphPath) { return pathToTreeNode(key, (GraphPath) value, dataSourceApi, rootObject); } return objectToTreeNode(key, value, dataSourceApi, rootObject); } private  UiHelper(); static boolean canBeTree(Object object); static PatchedDefaultMutableTreeNode keyValueToTreeNode(String key, Object value, DataSourceApi dataSourceApi, Object rootObject); static PatchedDefaultMutableTreeNode nodeToTreeNode(String key, GraphNode node, DataSourceApi dataSourceApi); static PatchedDefaultMutableTreeNode relationshipToTreeNode(String key, GraphRelationship relationship, DataSourceApi dataSourceApi); static String representUiString(String value); @SuppressWarnings("unchecked") static Optional<T> cast(Object o, Class<T> clazz); }
UiHelper { public static PatchedDefaultMutableTreeNode keyValueToTreeNode(String key, Object value, DataSourceApi dataSourceApi, Object rootObject) { if (value instanceof List) { return listToTreeNode(key, (List) value, dataSourceApi, rootObject); } if (value instanceof Map) { return mapToTreeNode(key, (Map) value, dataSourceApi, rootObject); } if (value instanceof GraphNode) { return nodeToTreeNode(key, (GraphNode) value, dataSourceApi); } if (value instanceof GraphRelationship) { return relationshipToTreeNode(key, (GraphRelationship) value, dataSourceApi); } if (value instanceof GraphPath) { return pathToTreeNode(key, (GraphPath) value, dataSourceApi, rootObject); } return objectToTreeNode(key, value, dataSourceApi, rootObject); } private  UiHelper(); static boolean canBeTree(Object object); static PatchedDefaultMutableTreeNode keyValueToTreeNode(String key, Object value, DataSourceApi dataSourceApi, Object rootObject); static PatchedDefaultMutableTreeNode nodeToTreeNode(String key, GraphNode node, DataSourceApi dataSourceApi); static PatchedDefaultMutableTreeNode relationshipToTreeNode(String key, GraphRelationship relationship, DataSourceApi dataSourceApi); static String representUiString(String value); @SuppressWarnings("unchecked") static Optional<T> cast(Object o, Class<T> clazz); static final int INLINE_TEXT_LENGTH; static final String MAP; static final String LIST; static final String TEXT; static final String PATH; static final String RELATIONSHIP; static final String NODE; static final String PROPERTIES; static final String LABELS; static final String ID; }