public Object apply(final Object a, final Object b) {
            if (null == a || null == b) {
                if (null == a && null == b)
                    return null;
                else
                    return null == b ? a : b;
            }

            if (a instanceof Map && b instanceof Map)
                ((Map<?, ?>) a).putAll((Map) b);
            else if (a instanceof Collection && b instanceof Collection)
                ((Collection<?>) a).addAll((Collection) b);
            else
                throw new IllegalArgumentException(String.format("Objects must be both of Map or Collection: a=%s b=%s",
                        a.getClass().getSimpleName(), b.getClass().getSimpleName()));
            return a;
        }
Takes all objects in the second {@code Collection} and adds them to the first. If the first is {@code null},
then the second {@code Collection} is returned and if the second is {@code null} then the first is returned.
If both are {@code null} then {@code null} is returned. Arguments must be of type {@code Map} or
{@code Collection}.
<p/>
The semantics described above for {@code Collection} are the same when applied to a {@code Map}.

@since 3.2.0-incubating
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/Operator.java