Object (final Object node, final int column) { Object userObject = ((DefaultMutableTreeNode)node).getUserObject(); return switch (column) { case 0 -> userObject; case 1 -> myCurrentMapping.get(userObject instanceof VirtualFile file ? file : null); default -> throw new RuntimeException("invalid column " + column); }; }