class DuplicateDelegator extends BaseDelegator implements IDuplicateDelegator {

    @Override
    public List<IFileSpec> duplicateRevisions(
            final IFileSpec fromFile,
            final IFileSpec toFile,
            final DuplicateRevisionsOptions opts) throws P4JavaException {

        List<Map<String, Object>> resultMaps = execMapCmdList(
                DUPLICATE,
                processParameters(
                        opts,
                        fromFile,
                        toFile,
                        null,
                        server),
                null);

        return buildNonNullObjectListFromCommandResultMaps(
                resultMaps,
                rethrowFunction(
                        // p4ic4idea: explicit generics
                        new FunctionWithException<Map<String, Object>, IFileSpec>() {
                            @Override
                            // p4ic4idea: explicit generics
                            public IFileSpec apply(Map<String, Object> map) throws P4JavaException {
                                return ResultListBuilder.handleIntegrationFileReturn(
                                        map,
                                        server);
                            }
                        }
                ));
    }

    public  DuplicateDelegator(IOptionsServer server);

}