Creates a clone of `set`.

@private
@param {Object} set The set to clone.
@param {Function} cloneFunc The function to clone values.
@param {boolean} [isDeep] Specify a deep clone.
@returns {Object} Returns the cloned set.
356160
function cloneSet$1(set, isDeep, cloneFunc) {
  var array = isDeep ? cloneFunc(setToArray(set), CLONE_DEEP_FLAG$3) : setToArray(set);
  return arrayReduce$2(array, addSetEntry, new set.constructor());
}
60676
function createSet(values) {
    var set = new Set();
    Lazy(values || []).flatten().each(function(e) {
      set.add(e);
    });
    return set;
  }
657621
function cloneFunction (fn) {
  var temp = function temporary () {
    return fn.apply(this, arguments)
  }
  for (var key in fn) {
    temp[key] = fn[key]
  }
  return temp
}
1341408
function _clone(value) {
  if(value && typeof value === 'object') {
    var rval;
    if(_isArray(value)) {
      rval = [];
      for(var i = 0; i < value.length; ++i) {
        rval[i] = _clone(value[i]);
      }
    }
    else {
      rval = {};
      for(var key in value) {
        rval[key] = _clone(value[key]);
      }
    }
    return rval;
  }
  return value;
}
1091746
function cloneObj(a,b) {
  Object.keys(b).forEach(function(k) {
    a[k] = b[k];
  });
  return a;
}
654435
function copyIfSet(src, dest, prop) {
	if (src[prop]) {
		dest[prop] = src[prop];
	}
}
502006
function clone(obj) {
    if (Array.isArray(obj)) {
        return obj.map(clone);
    } else if (typeof obj === 'object') {
        var copy = {};
        Object.keys(obj).forEach(function (key) {
            copy[key] = clone(obj[key]);
        });
        return copy;
    }
    return obj;
}
1358969
function clone (obj, deep) {
  if (obj) {
    return deep ? deepClone(obj) : objectAssign(isPlainObject(obj) ? {} : [], obj)
  }
  return obj
}
1037608
function merge(source, target) {
    if (target == null) {
        return clone(source);
    }
    if (source == null) {
        return clone(target);
    }
    if (typeof source !== 'object' || typeof target !== 'object') {
        return clone(target);
    }
    const merge = (source, target) => {
        Object.keys(target).forEach(key => {
            if (source[key] == null) {
                source[key] = target[key];
            } else if (typeof source[key] === 'object') {
                if (typeof target[key] === 'object') {
                    merge(source[key], target[key]);
                } else {
                    source[key] = target[key];
                }
            } else {
                source[key] = target[key];
            }
        });

        return source;
    };

    return merge(clone(source), clone(target));
}
774441
@SuppressWarnings("unchecked")
    protected Set _transform(final Set set) {
        if (set == null) return null;
        if (set instanceof BeanSet) return set;
        return new BeanSet<>(set, this);
    }
144633
function setProperty(inherits, target, key, descriptor, publicStatic, isNOTExtendingNative) {
    var
      hasValue = hOP.call(descriptor, VALUE),
      configurable,
      value
    ;
    if (publicStatic) {
      if (hOP.call(target, key)) {
        // in case the value is not a static one
        if (
          inherits &&
          isObject(target[key]) &&
          isObject(inherits[CONSTRUCTOR][key])
        ) {
          copyMerged(inherits[CONSTRUCTOR][key], target[key]);
        }
        return;
      } else if (hasValue) {
        // in case it's an object perform a deep copy
        copyValueIfObject(descriptor, copyDeep);
      }
    } else if (hasValue) {
      value = descriptor[VALUE];
      if (typeof value === 'function' && trustSuper(value)) {
        descriptor[VALUE] = wrap(inherits, key, value, publicStatic);
      }
    } else if (isNOTExtendingNative) {
      wrapGetOrSet(inherits, key, descriptor, 'get');
      wrapGetOrSet(inherits, key, descriptor, 'set');
    }
    configurable = isConfigurable(key, publicStatic);
    descriptor.enumerable = false; // was: publicStatic;
    descriptor.configurable = configurable;
    if (hasValue) {
      descriptor.writable = configurable;
    }
    defineProperty(target, key, descriptor);
  }
461193
function _$set(kp, value, lazyEmit) {
        if (_destroy) return _destroyNotice()

        return _$sync(kp, value, lazyEmit)
        // if (!diff) return
        /**
         *  Base type change of object type will be trigger change event
         *  next and pre value are not keypath value but property value
         */
        // if ( kp == diff.mounted && $util.diff(diff.next, diff.pre) ) {
        //     var propname = diff.mounted
        //     // emit change immediately
        //     _emitChange(propname, diff.next, diff.pre)
        // }
    }
1296504
function setup(settings) {
    if (!settings) {
        return _.cloneDeep(SETTINGS);
    }
    _.merge(SETTINGS, settings);
    return _.cloneDeep(SETTINGS);
}
312496
function clone() {
    var cloned = new this.constructor(this.client);
    cloned._method = this._method;
    cloned._single = assign({}, this._single);
    cloned._options = assign({}, this._options);
    cloned._statements = this._statements.slice();
    return cloned;
  }
720867
public static <T> Set<T> dup(Collection<T> collection)
	{
		if(isEmpty(collection))
			return new HashSet<T>();
		return new HashSet<T>(collection);
	}
368518
function clone(value, deep) {
    if (Array.isArray(value)) {
      if (deep) {
        return value.map(function(value) {
          return clone(value, deep);
        });
      } else {
        return value.slice();
      }
    } else if (value && typeof value === 'object') {
      if (value.valueOf() !== value) {
        return new value.constructor(value.valueOf());
      } else {
        var copy = {};
        for (var key in value) {
          var objValue = value[key];
          if (deep) {
            objValue = clone(objValue, deep);
          }
          copy[key] = objValue;
        }
        return copy;
      }
    } else {
      return value;
    }
  }
500361
function cloneMap$1(map, isDeep, cloneFunc) {
  var array = isDeep ? cloneFunc(mapToArray(map), CLONE_DEEP_FLAG$2) : mapToArray(map);
  return arrayReduce(array, addMapEntry, new map.constructor());
}