public boolean containsEntry(Entry entry) {
      if (entry instanceof EnvelopeEntry) {
         return entries.contains(entry);
      } else if (entry instanceof PrimitiveEntry) {
         for (Iterator it = entries.iterator(); it.hasNext(); ) {
            Entry e = (Entry) it.next();
            if (e.equals(entry))
               return true;
            if ((e instanceof EnvelopeEntry) &&
                ((EnvelopeEntry) e).containsEntry(entry))
               return true;
         }
      }
      return false;
   }