当前位置: 首页>>代码示例>>Java>>正文


Java CollectionsUtil.convertCollection方法代码示例

本文整理汇总了Java中jetbrains.buildServer.util.CollectionsUtil.convertCollection方法的典型用法代码示例。如果您正苦于以下问题:Java CollectionsUtil.convertCollection方法的具体用法?Java CollectionsUtil.convertCollection怎么用?Java CollectionsUtil.convertCollection使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在jetbrains.buildServer.util.CollectionsUtil的用法示例。


在下文中一共展示了CollectionsUtil.convertCollection方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createNewClient

import jetbrains.buildServer.util.CollectionsUtil; //导入方法依赖的package包/类
@NotNull
@Override
public CloudClientEx createNewClient(@NotNull CloudState cloudState, @NotNull CloudClientParameters cloudClientParameters) {
    try {
        final KubeCloudClientParametersImpl kubeClientParams = KubeCloudClientParametersImpl.create(cloudClientParameters);
        final KubeApiConnector apiConnector = KubeApiConnectorImpl.create(kubeClientParams, myAuthStrategies.get(kubeClientParams.getAuthStrategy()));
        List<KubeCloudImage> images = CollectionsUtil.convertCollection(kubeClientParams.getImages(), kubeCloudImageData -> {
            KubeCloudImageImpl kubeCloudImage = new KubeCloudImageImpl(kubeCloudImageData, apiConnector, myCache);
            kubeCloudImage.populateInstances();
            return kubeCloudImage;
        });
        return new KubeCloudClient(
                myServerSettings.getServerUUID(),
                cloudState.getProfileId(),
                apiConnector,
                images,
                kubeClientParams,
                myPodTemplateProviders,
                myCache,
                myUpdater);
    } catch (Throwable ex){
        if(ex instanceof KubernetesClientException){
            final Throwable cause = ex.getCause();
            if(cause != null) throw new CloudException(cause.getMessage(), cause);
            else throw ex;
        } else throw ex;
    }
}
 
开发者ID:JetBrains,项目名称:teamcity-kubernetes-plugin,代码行数:29,代码来源:KubeCloudClientFactory.java

示例2: filterPaths

import jetbrains.buildServer.util.CollectionsUtil; //导入方法依赖的package包/类
@NotNull
public List<String> filterPaths(@NotNull List<String> paths) {
  if (isIncludeAll()) return paths;

  final Collection<PathNode> files = AntPatternTreeMatcher.scan(createPathTree(paths), myIncludePatterns, myExcludePatterns, AntPatternTreeMatcher.ScanOption.LEAFS_ONLY);
  return CollectionsUtil.convertCollection(files, PathNode::getPath);
}
 
开发者ID:JetBrains,项目名称:teamcity-s3-artifact-storage-plugin,代码行数:8,代码来源:PathPatternFilter.java

示例3: getTriggerPropertiesProcessor

import jetbrains.buildServer.util.CollectionsUtil; //导入方法依赖的package包/类
@NotNull
@Override
public PropertiesProcessor getTriggerPropertiesProcessor() {
  return new PropertiesProcessor() {
    @Override
    public Collection<InvalidProperty> process(Map<String, String> properties) {
      return CollectionsUtil.convertCollection(ParametersValidator.validateSettings(properties, false).entrySet(), new Converter<InvalidProperty, Map.Entry<String, String>>() {
        @Override
        public InvalidProperty createFrom(@NotNull Map.Entry<String, String> source) {
          return new InvalidProperty(source.getKey(), source.getValue());
        }
      });
    }
  };
}
 
开发者ID:JetBrains,项目名称:teamcity-aws-codepipeline-plugin,代码行数:16,代码来源:CodePipelineBuildTriggerService.java

示例4: getChildren

import jetbrains.buildServer.util.CollectionsUtil; //导入方法依赖的package包/类
@NotNull
public List<GraphNode> getChildren() {
  return CollectionsUtil.convertCollection(myBuildType.getDependencies(), new Converter<GraphNode, Dependency>() {
    public GraphNode createFrom(@NotNull final Dependency dependency) {
      return new BuildTypeNode(dependency.getDependOn());
    }
  });
}
 
开发者ID:JetBrains,项目名称:build-chain-export,代码行数:9,代码来源:BuildTypeNode.java

示例5: getChildren

import jetbrains.buildServer.util.CollectionsUtil; //导入方法依赖的package包/类
@NotNull
public List<GraphNode> getChildren() {
  return CollectionsUtil.convertCollection(myPromotion.getDependencies(), new Converter<GraphNode, BuildDependency>() {
    public GraphNode createFrom(@NotNull final BuildDependency buildDependency) {
      return new PromotionNode(buildDependency.getDependOn());
    }
  });
}
 
开发者ID:JetBrains,项目名称:build-chain-export,代码行数:9,代码来源:PromotionNode.java

示例6: getImages

import jetbrains.buildServer.util.CollectionsUtil; //导入方法依赖的package包/类
@NotNull
@Override
public Collection<KubeCloudImageData> getImages(){
    return CollectionsUtil.convertCollection(myParameters.getCloudImages(), KubeCloudImageData::new);
}
 
开发者ID:JetBrains,项目名称:teamcity-kubernetes-plugin,代码行数:6,代码来源:KubeCloudClientParametersImpl.java

示例7: listNamespaces

import jetbrains.buildServer.util.CollectionsUtil; //导入方法依赖的package包/类
@NotNull
@Override
public Collection<String> listNamespaces() {
    return CollectionsUtil.convertCollection(myKubernetesClient.namespaces().list().getItems(), namespace -> namespace.getMetadata().getName());
}
 
开发者ID:JetBrains,项目名称:teamcity-kubernetes-plugin,代码行数:6,代码来源:KubeApiConnectorImpl.java

示例8: listDeployments

import jetbrains.buildServer.util.CollectionsUtil; //导入方法依赖的package包/类
@NotNull
@Override
public Collection<String> listDeployments() {
    return CollectionsUtil.convertCollection(myKubernetesClient.extensions().deployments().list().getItems(), namespace -> namespace.getMetadata().getName());
}
 
开发者ID:JetBrains,项目名称:teamcity-kubernetes-plugin,代码行数:6,代码来源:KubeApiConnectorImpl.java

示例9: getPathsToDelete

import jetbrains.buildServer.util.CollectionsUtil; //导入方法依赖的package包/类
@NotNull
private List<String> getPathsToDelete(@NotNull ArtifactListData artifactsInfo, @NotNull String patterns, @NotNull String pathPrefix) throws IOException {
  final List<String> keys = CollectionsUtil.convertCollection(artifactsInfo.getArtifactList(), ArtifactData::getPath);
  return new ArrayList<>(new PathPatternFilter(patterns).filterPaths(keys));
}
 
开发者ID:JetBrains,项目名称:teamcity-s3-artifact-storage-plugin,代码行数:6,代码来源:S3CleanupExtension.java


注:本文中的jetbrains.buildServer.util.CollectionsUtil.convertCollection方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。