热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

hudson.model.Label.matches()方法的使用及代码示例

本文整理了Java中hudson.model.Label.matches()方法的一些代码示例,展示了Label.matches()的具体用法

本文整理了Java中hudson.model.Label.matches()方法的一些代码示例,展示了Label.matches()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Label.matches()方法的具体详情如下:
包路径:hudson.model.Label
类名称:Label
方法名:matches

Label.matches介绍

[英]Evaluates whether the current label name is equal to the name parameter.
[中]计算当前标签名称是否等于name参数。

代码示例

代码示例来源:origin: jenkinsci/jenkins

@Override
public boolean matches(VariableResolver resolver) {
return base.matches(resolver);
}

代码示例来源:origin: jenkinsci/jenkins

@Override
public boolean matches(VariableResolver resolver) {
return !base.matches(resolver);
}

代码示例来源:origin: jenkinsci/jenkins

/**
* Evaluates whether the label expression is true when an entity owns the given set of
* {@link LabelAtom}s.
*/
public final boolean matches(final Collection labels) {
return matches(new VariableResolver() {
public Boolean resolve(String name) {
for (LabelAtom a : labels)
if (a.getName().equals(name))
return true;
return false;
}
});
}

代码示例来源:origin: jenkinsci/jenkins

@Override
public final boolean equals(Object that) {
if (this == that) return true;
if (that == null || getClass() != that.getClass()) return false;
return matches(((Label)that).name);
}

代码示例来源:origin: jenkinsci/jenkins

/**
* Note that we evaluate both branches of the expression all the time.
* That is, it behaves like "a|b" not "a||b"
*/
@Override
public boolean matches(VariableResolver resolver) {
return op(lhs.matches(resolver),rhs.matches(resolver));
}

代码示例来源:origin: jenkinsci/jenkins

public final boolean matches(Node n) {
return matches(n.getAssignedLabels());
}

代码示例来源:origin: jenkinsci/jenkins

/**
* Gets all {@link Node}s that belong to this label.
*/
@Exported
public Set getNodes() {
Set nodes = this.nodes;
if(nodes!=null) return nodes;
Set r = new HashSet<>();
Jenkins h = Jenkins.getInstance();
if(this.matches(h))
r.add(h);
for (Node n : h.getNodes()) {
if(this.matches(n))
r.add(n);
}
return this.nodes = Collections.unmodifiableSet(r);
}

代码示例来源:origin: jenkinsci/jenkins

if (topLevelItem instanceof AbstractProject) {
final AbstractProject project = (AbstractProject) topLevelItem;
if (matches(project.getAssignedLabelString())) {
result++;
if (i instanceof AbstractProject) {
final AbstractProject project = (AbstractProject) i;
if (matches(project.getAssignedLabelString())) {
result++;

代码示例来源:origin: org.jvnet.hudson.main/hudson-core

@Override
public boolean matches(VariableResolver resolver) {
return !base.matches(resolver);
}

代码示例来源:origin: org.eclipse.hudson/hudson-core

@Override
public boolean matches(VariableResolver resolver) {
return !base.matches(resolver);
}

代码示例来源:origin: org.eclipse.hudson/hudson-core

/**
* Note that we evaluate both branches of the expression all the time.
* That is, it behaves like "a|b" not "a||b"
*/
@Override
public boolean matches(VariableResolver resolver) {
return op(lhs.matches(resolver), rhs.matches(resolver));
}

代码示例来源:origin: org.eclipse.hudson.main/hudson-core

/**
* Note that we evaluate both branches of the expression all the time.
* That is, it behaves like "a|b" not "a||b"
*/
@Override
public boolean matches(VariableResolver resolver) {
return op(lhs.matches(resolver),rhs.matches(resolver));
}

代码示例来源:origin: org.jenkins-ci.main/jenkins-core

/**
* Note that we evaluate both branches of the expression all the time.
* That is, it behaves like "a|b" not "a||b"
*/
@Override
public boolean matches(VariableResolver resolver) {
return op(lhs.matches(resolver),rhs.matches(resolver));
}

代码示例来源:origin: org.jenkins-ci.main/jenkins-core

@Override
public final boolean equals(Object that) {
if (this == that) return true;
if (that == null || getClass() != that.getClass()) return false;
return matches(((Label)that).name);
}

代码示例来源:origin: org.jvnet.hudson.main/hudson-core

/**
* Note that we evaluate both branches of the expression all the time.
* That is, it behaves like "a|b" not "a||b"
*/
@Override
public boolean matches(VariableResolver resolver) {
return op(lhs.matches(resolver),rhs.matches(resolver));
}

代码示例来源:origin: hudson/hudson-2.x

/**
* Note that we evaluate both branches of the expression all the time.
* That is, it behaves like "a|b" not "a||b"
*/
@Override
public boolean matches(VariableResolver resolver) {
return op(lhs.matches(resolver),rhs.matches(resolver));
}

代码示例来源:origin: jenkinsci/selenium-plugin

public boolean match(Node node) {
if (node == null)
return false;
try {
return Label.parseExpression(labelExpr).matches(node);
} catch (ANTLRException e) {
}
return false;
}

代码示例来源:origin: jenkinsci/jclouds-plugin

/**
* Gets {@link jenkins.plugins.jclouds.compute.JCloudsSlaveTemplate} that has the matching {@link Label}.
* @param label The label to be matched.
* @return The slave template or {@code null} if the specified label did not match.
*/
public JCloudsSlaveTemplate getTemplate(Label label) {
for (JCloudsSlaveTemplate t : templates)
if (label == null || label.matches(t.getLabelSet()))
return t;
return null;
}

代码示例来源:origin: carlossg/jenkins-kubernetes-plugin

@Override
protected PodTemplate transform(@Nonnull KubernetesCloud cloud, @Nonnull PodTemplate podTemplate, @CheckForNull Label label) {
if ((label == null && podTemplate.getNodeUsageMode() == Node.Mode.NORMAL) || (label != null && label.matches(podTemplate.getLabelSet()))) {
return podTemplate;
}
return null;
}
}

代码示例来源:origin: jenkinsci/selenium-plugin

public Boolean call() throws ANTLRException {
Node n = Jenkins.getInstance().getNode(nodeName);
if (n == null)
return false;
return Label.parseExpression(labelExpr).matches(n);
}

推荐阅读
  • Python正则表达式学习记录及常用方法
    本文记录了学习Python正则表达式的过程,介绍了re模块的常用方法re.search,并解释了rawstring的作用。正则表达式是一种方便检查字符串匹配模式的工具,通过本文的学习可以掌握Python中使用正则表达式的基本方法。 ... [详细]
  • node.jsurlsearchparamsAPI哎哎哎 ... [详细]
  • Spring源码解密之默认标签的解析方式分析
    本文分析了Spring源码解密中默认标签的解析方式。通过对命名空间的判断,区分默认命名空间和自定义命名空间,并采用不同的解析方式。其中,bean标签的解析最为复杂和重要。 ... [详细]
  • 向QTextEdit拖放文件的方法及实现步骤
    本文介绍了在使用QTextEdit时如何实现拖放文件的功能,包括相关的方法和实现步骤。通过重写dragEnterEvent和dropEvent函数,并结合QMimeData和QUrl等类,可以轻松实现向QTextEdit拖放文件的功能。详细的代码实现和说明可以参考本文提供的示例代码。 ... [详细]
  • Go Cobra命令行工具入门教程
    本文介绍了Go语言实现的命令行工具Cobra的基本概念、安装方法和入门实践。Cobra被广泛应用于各种项目中,如Kubernetes、Hugo和Github CLI等。通过使用Cobra,我们可以快速创建命令行工具,适用于写测试脚本和各种服务的Admin CLI。文章还通过一个简单的demo演示了Cobra的使用方法。 ... [详细]
  • 导出功能protectedvoidbtnExport(objectsender,EventArgse){用来打开下载窗口stringfileName中 ... [详细]
  • 本文介绍了如何使用elementui分页组件进行分页功能的改写,只需一行代码即可调用。通过封装分页组件,避免在每个页面都写跳转请求的重复代码。详细的代码示例和使用方法在正文中给出。 ... [详细]
  • Ihaveaworkfolderdirectory.我有一个工作文件夹目录。holderDir.glob(*)>holder[ProjectOne, ... [详细]
  • 带添加按钮的GridView,item的删除事件
    先上图片效果;gridView无数据时显示添加按钮,有数据时,第一格显示添加按钮,后面显示数据:布局文件:addr_manage.xml<?xmlve ... [详细]
  • PHP反射API的功能和用途详解
    本文详细介绍了PHP反射API的功能和用途,包括动态获取信息和调用对象方法的功能,以及自动加载插件、生成文档、扩充PHP语言等用途。通过反射API,可以获取类的元数据,创建类的实例,调用方法,传递参数,动态调用类的静态方法等。PHP反射API是一种内建的OOP技术扩展,通过使用Reflection、ReflectionClass和ReflectionMethod等类,可以帮助我们分析其他类、接口、方法、属性和扩展。 ... [详细]
  • OpenMap教程4 – 图层概述
    本文介绍了OpenMap教程4中关于地图图层的内容,包括将ShapeLayer添加到MapBean中的方法,OpenMap支持的图层类型以及使用BufferedLayer创建图像的MapBean。此外,还介绍了Layer背景标志的作用和OMGraphicHandlerLayer的基础层类。 ... [详细]
  • 本文介绍了利用ARMA模型对平稳非白噪声序列进行建模的步骤及代码实现。首先对观察值序列进行样本自相关系数和样本偏自相关系数的计算,然后根据这些系数的性质选择适当的ARMA模型进行拟合,并估计模型中的位置参数。接着进行模型的有效性检验,如果不通过则重新选择模型再拟合,如果通过则进行模型优化。最后利用拟合模型预测序列的未来走势。文章还介绍了绘制时序图、平稳性检验、白噪声检验、确定ARMA阶数和预测未来走势的代码实现。 ... [详细]
  • Commit1ced2a7433ea8937a1b260ea65d708f32ca7c95eintroduceda+Clonetraitboundtom ... [详细]
  • 本文讨论了在Windows 8上安装gvim中插件时出现的错误加载问题。作者将EasyMotion插件放在了正确的位置,但加载时却出现了错误。作者提供了下载链接和之前放置插件的位置,并列出了出现的错误信息。 ... [详细]
  • 本文介绍了一种划分和计数油田地块的方法。根据给定的条件,通过遍历和DFS算法,将符合条件的地块标记为不符合条件的地块,并进行计数。同时,还介绍了如何判断点是否在给定范围内的方法。 ... [详细]
author-avatar
天云2_776
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有