All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.rits.cloning.FastClonerCustomCollection Maven / Gradle / Ivy

package com.rits.cloning;

import java.util.Collection;
import java.util.Map;

/**
 * @author kostantinos.kougios
 *
 * 21 May 2009
 */
@SuppressWarnings({ "unchecked", "rawtypes" })
public abstract class FastClonerCustomCollection implements IFastCloner
{
	public abstract T getInstance(T o);

    public Object clone(final Object t, final IDeepCloner cloner, final Map clones) {
		final T c = getInstance((T) t);
		final T l = (T) t;
		for (final Object o : l)
		{
            final Object clone = cloner.deepClone(o, clones);
            c.add(clone);
		}
		return c;
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy