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


Java Objects.equal方法代码示例

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


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

示例1: updateVersions

import io.fabric8.utils.Objects; //导入方法依赖的package包/类
public void updateVersions(List<DependencyVersionChange> changes, Map<String, String> propertyChanges) {
    for (DependencyVersionChange change : changes) {
        String scope = change.getScope();
        boolean lazyAdd = shouldLazyAdd(change);
        if (Objects.equal(MavenScopes.PLUGIN, scope)) {
            if (PomHelper.updatePluginVersion(doc, change, propertyChanges, lazyAdd)) {
                updated = true;
            }
        } else {
            if (PomHelper.updateDependencyVersion(doc, change, propertyChanges)) {
                updated = true;
            }
            // TODO check for BOM / Parent change too!
        }
    }
}
 
开发者ID:fabric8-updatebot,项目名称:updatebot,代码行数:17,代码来源:PomUpdateStatus.java

示例2: findPlugin

import io.fabric8.utils.Objects; //导入方法依赖的package包/类
public static MavenPlugin findPlugin(Project project, String groupId, String artifactId) {
    if (project != null) {
        MavenPluginFacet pluginFacet = project.getFacet(MavenPluginFacet.class);
        if (pluginFacet != null) {
            List<MavenPlugin> plugins = pluginFacet.listConfiguredPlugins();
            if (plugins != null) {
                for (MavenPlugin plugin : plugins) {
                    Coordinate coordinate = plugin.getCoordinate();
                    if (coordinate != null) {
                        if (Objects.equal(groupId, coordinate.getGroupId()) &&
                                Objects.equal(artifactId, coordinate.getArtifactId())) {
                            return plugin;
                        }
                    }
                }
            }
        }
    }
    return null;
}
 
开发者ID:fabric8io,项目名称:fabric8-forge,代码行数:21,代码来源:MavenHelpers.java

示例3: findCamelNodeForPath

import io.fabric8.utils.Objects; //导入方法依赖的package包/类
protected static Node findCamelNodeForPath(Node node, String path) {
    NodeList childNodes = node.getChildNodes();
    if (childNodes != null) {
        Map<String, Integer> nodeCounts = new HashMap<>();
        for (int i = 0, size = childNodes.getLength(); i < size; i++) {
            Node child = childNodes.item(i);
            if (child instanceof Element) {
                String actual = getIdOrIndex(child, nodeCounts);
                if (Objects.equal(actual, path)) {
                    return child;
                }
            }
        }
    }
    return null;
}
 
开发者ID:fabric8io,项目名称:fabric8-forge,代码行数:17,代码来源:CamelXmlHelper.java

示例4: substituteEnvironmentVariableExpressions

import io.fabric8.utils.Objects; //导入方法依赖的package包/类
public static void substituteEnvironmentVariableExpressions(Map<String, String> map, Map<String, String> environmentVariables) {
    Set<Map.Entry<String, String>> envEntries = environmentVariables.entrySet();
    for (String key : map.keySet()) {
        String text = map.get(key);
        String oldText = text;
        if (Strings.isNotBlank(text)) {
            for (Map.Entry<String, String> envEntry : envEntries) {
                String envKey = envEntry.getKey();
                String envValue = envEntry.getValue();
                if (Strings.isNotBlank(envKey) && Strings.isNotBlank(envValue)) {
                    text = text.replace("${env:" + envKey + "}", envValue);
                }
            }
            if (!Objects.equal(oldText, text)) {
                map.put(key, text);
            }
        }
    }
}
 
开发者ID:fabric8io,项目名称:jube,代码行数:20,代码来源:ProcessManagerService.java

示例5: userNamespace

import io.fabric8.utils.Objects; //导入方法依赖的package包/类
/**
 * Returns true if this namespace is a user namespace
 */
public boolean userNamespace() {
    if (Strings.isNotBlank(name)) {
        return Objects.equal("user", type);
    }
    return false;
}
 
开发者ID:fabric8-launcher,项目名称:launcher-backend,代码行数:10,代码来源:NamespaceDTO.java

示例6: namespacesForType

import io.fabric8.utils.Objects; //导入方法依赖的package包/类
protected static List<String> namespacesForType(List<NamespaceDTO> namespaces, String type) {
    List<String> answer = new ArrayList<>();
    if (namespaces != null) {
        for (NamespaceDTO namespace : namespaces) {
            String name = namespace.getName();
            if (Strings.isNotBlank(name)) {
                if (Objects.equal(type, namespace.getType())) {
                    answer.add(namespace.getName());
                }
            }
        }
    }
    Collections.sort(answer);
    return answer;
}
 
开发者ID:fabric8-launcher,项目名称:launcher-backend,代码行数:16,代码来源:Tenants.java

示例7: updateBotCommentCommand

import io.fabric8.utils.Objects; //导入方法依赖的package包/类
private String updateBotCommentCommand(CommandContext context, GHIssueComment comment) throws IOException {
    GHUser user = comment.getUser();
    if (user != null) {
        if (Objects.equal(context.getConfiguration().getGithubUsername(), user.getLogin())) {
            String body = comment.getBody();
            if (body != null) {
                body = body.trim();
                if (body.startsWith(PullRequests.COMMAND_COMMENT_PREFIX)) {
                    return body;
                }
            }
        }
    }
    return null;
}
 
开发者ID:fabric8-updatebot,项目名称:updatebot,代码行数:16,代码来源:UpdatePullRequests.java

示例8: hasLabel

import io.fabric8.utils.Objects; //导入方法依赖的package包/类
public static boolean hasLabel(Collection<GHLabel> labels, String label) {
    if (labels != null) {
        for (GHLabel ghLabel : labels) {
            if (Objects.equal(label, ghLabel.getName())) {
                return true;
            }
        }
    }
    return false;
}
 
开发者ID:fabric8-updatebot,项目名称:updatebot,代码行数:11,代码来源:GitHubHelpers.java

示例9: updateBotIssuePendingChangesComment

import io.fabric8.utils.Objects; //导入方法依赖的package包/类
public static String updateBotIssuePendingChangesComment(CommandContext context, GHIssueComment comment) throws IOException {
    GHUser user = comment.getUser();
    if (user != null) {
        if (Objects.equal(context.getConfiguration().getGithubUsername(), user.getLogin())) {
            String body = comment.getBody();
            if (body != null) {
                body = body.trim();
                if (body.startsWith(PENDING_CHANGE_COMMENT_PREFIX)) {
                    return body;
                }
            }
        }
    }
    return null;
}
 
开发者ID:fabric8-updatebot,项目名称:updatebot,代码行数:16,代码来源:Issues.java

示例10: findRepository

import io.fabric8.utils.Objects; //导入方法依赖的package包/类
/**
 * Returns the repository for the given name or null if it could not be found
 */
public static LocalRepository findRepository(List<LocalRepository> localRepositories, String name) {
    if (localRepositories != null) {
        for (LocalRepository repository : localRepositories) {
            GitRepository repo = repository.getRepo();
            if (repo != null) {
                if (Objects.equal(name, repo.getName())) {
                    return repository;
                }
            }
        }
    }
    return null;
}
 
开发者ID:fabric8-updatebot,项目名称:updatebot,代码行数:17,代码来源:LocalRepository.java

示例11: getRepositoryDetails

import io.fabric8.utils.Objects; //导入方法依赖的package包/类
public GitRepositoryConfig getRepositoryDetails(String cloneUrl) {
    GitRepositoryConfig answer = github.getRepositoryDetails(cloneUrl);
    if (answer == null) {
        for (GitRepository gitRepository : git) {
            if (Objects.equal(cloneUrl, gitRepository.getCloneUrl())) {
                answer = gitRepository.getRepositoryDetails();
                if (answer != null) {
                    return answer;
                }
            }
        }
    }
    return answer;
}
 
开发者ID:fabric8-updatebot,项目名称:updatebot,代码行数:15,代码来源:RepositoryConfig.java

示例12: assertChangesValid

import io.fabric8.utils.Objects; //导入方法依赖的package包/类
protected static void assertChangesValid(File file, Document doc, List<DependencyVersionChange> changes) {
    for (DependencyVersionChange change : changes) {
        if (Objects.equal(MavenScopes.PLUGIN, change.getScope())) {
            assertPluginVersionChanged(file, doc, change);
        } else {
            assertDependencyVersionChanged(file, doc, change);
        }
    }
}
 
开发者ID:fabric8-updatebot,项目名称:updatebot,代码行数:10,代码来源:PomHelperTest.java

示例13: findOrganisation

import io.fabric8.utils.Objects; //导入方法依赖的package包/类
public GithubOrganisation findOrganisation(String name) {
    if (organisations != null) {
        for (GithubOrganisation organisation : organisations) {
            if (Objects.equal(name, organisation.getName())) {
                return organisation;
            }
        }
    }
    return null;
}
 
开发者ID:fabric8-updatebot,项目名称:updatebot,代码行数:11,代码来源:GitHubProjects.java

示例14: equalAnyValue

import io.fabric8.utils.Objects; //导入方法依赖的package包/类
/**
 * Returns true if the actual value matches any of the String representations of the given values.
 * <p>
 * So can match against String or URL objects etc
 */
public static boolean equalAnyValue(String actual, Object... values) {
    for (Object value : values) {
        if (value != null) {
            String text = value.toString();
            if (Objects.equal(text, actual)) {
                return true;
            }
        }
    }
    return false;
}
 
开发者ID:fabric8-updatebot,项目名称:updatebot,代码行数:17,代码来源:Strings.java

示例15: findElementsWithName

import io.fabric8.utils.Objects; //导入方法依赖的package包/类
public static List<Element> findElementsWithName(Element rootElement, String elementName) {
    List<Element> answer = new ArrayList<>();
    List<Element> children = rootElement.getChildren();
    for (Element child : children) {
        if (Objects.equal(elementName, child.getName())) {
            answer.add(child);
        } else {
            answer.addAll(findElementsWithName(child, elementName));
        }
    }
    return answer;
}
 
开发者ID:fabric8-updatebot,项目名称:updatebot,代码行数:13,代码来源:DecentXmlHelper.java


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