public static <T> boolean addAll(final Collection<T> collection,
      final Enumeration<T> enumeration) {
    if (null == enumeration) {
      return false;
    }

    boolean modified = false;
    while (enumeration.hasMoreElements()) {
      modified |= collection.add(enumeration.nextElement());
    }
    return modified;
  }
Add all elements of an {@link Enumeration} to a {@link Collection}.

@param collection to add from enumeration.
@param enumeration to add to collection.
@return true if collection is modified, otherwise false.
@since GemFire 8.1
@see Collection#addAll(Collection)
geode-core/src/main/java/org/apache/geode/internal/util/CollectionUtils.java