code: private static Object getChildWith(Object node, Object userObject, 
          BiPredicate<Object, Object> equality)
      {
          DefaultMutableTreeNode treeNode = (DefaultMutableTreeNode)node;
          for (int j=0; j<treeNode.getChildCount(); j++)
          {
              TreeNode child = treeNode.getChildAt(j);
              Object childUserObject = getUserObjectFromTreeNode(child);
              if (equality.test(userObject, childUserObject))
              {
                  return child;
              }
          }
          return null;
      }
docs: Returns the child of the given tree node that has a user object that
  is equal to the given one, based on the given equality predicate.
  Assumes DefaultMutableTreeNodes.
  
  @param node The node
  @param userObject The user object
  @param equality The equality predicate
  @return The child with the given user object, or <code>null</code>
  if no such child can be found.