code: public static <T> Collection<T> createCollection(Collection collection) {
          MultiMapConfig.ValueCollectionType collectionType = findCollectionType(collection);
          if (collection.isEmpty()) {
              return emptyCollection(collectionType);
          }
          return createCollection(collectionType, collection.size());
      }
docs: Creates a same type collection with the given collection depending on the
  {@link com.hazelcast.config.MultiMapConfig#valueCollectionType}.
  
  @param collection to be asked to return a new appropriate implementation instance
  according to {@link MultiMapConfig.ValueCollectionType}
  @return {@link java.util.Set} or {@link java.util.List} depending on the collectionType argument
  @throws java.lang.IllegalArgumentException if collectionType is unknown