static <T> T copy(T object, DataComplexTable alreadyCopied) throws CloneNotSupportedException
  {
    if (object == null)
    {
      return null;
    }
    else if (isComplex(object))
    {
      DataComplex src = (DataComplex) object;

      @SuppressWarnings("unchecked")
      T found = (T) alreadyCopied.get(src);

      if (found != null)
      {
        return found;
      }
      else
      {
        DataComplex clone = src.clone();
        alreadyCopied.put(src, clone);

        if (clone instanceof DataMap)
        {
          ((DataMap)clone).copyReferencedObjects(alreadyCopied);
        }
        else if (clone instanceof DataList)
        {
          ((DataList)clone).copyReferencedObjects(alreadyCopied);
        }

        @SuppressWarnings("unchecked")
        T converted = (T) clone;
        return converted;
      }
    }
    else if (isPrimitive(object))
    {
      return object;
    }
    else
    {
      throw new CloneNotSupportedException("Illegal value encountered: " + object);
    }
  }
@Test
  public void mapClonesHaveDifferentHashValues() throws CloneNotSupportedException
  {
    DataMap originalMap = new DataMap();
    originalMap.put("key", "value");

    DataMap copyMap = originalMap.copy();

    // The objects should be "equal," but not identical.
    assertTrue(copyMap.equals(originalMap));
    assertFalse(copyMap.dataComplexHashCode() == originalMap.dataComplexHashCode());
  }