ru.qatools.gridrouter.config.WithCopy Maven / Gradle / Ivy
package ru.qatools.gridrouter.config;
import java.util.ArrayList;
import java.util.List;
/**
* @author Dmitry Baev [email protected]
* @author Innokenty Shuvalov [email protected]
*/
public interface WithCopy {
List getHosts();
String getName();
/**
* Creates a copy for the {@link Region} object, which is almost deep:
* the hosts itself are not copied although the list is new.
*
* @return a copy of the object
*/
default Region copy() {
return new Region(new ArrayList<>(getHosts()), getName());
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy