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

ru.qatools.gridrouter.config.WithCopy Maven / Gradle / Ivy

There is a newer version: 1.31
Show newest version
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