本文整理了Java中org.guvnor.common.services.project.model.Package.equals()
方法的一些代码示例,展示了Package.equals()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Package.equals()
方法的具体详情如下:
包路径:org.guvnor.common.services.project.model.Package
类名称:Package
方法名:equals
暂无
代码示例来源:origin: org.kie.workbench.screens/kie-wb-common-project-explorer-client
/**
* A convenience method to compare two PAckages avoiding cluttering code with null checks.
* @param pkg
* @param activePackage
* @return
*/
public static boolean hasPackageChanged(final Package pkg,
final Package activePackage) {
if (pkg == null && activePackage != null) {
return true;
}
if (pkg != null && activePackage == null) {
return true;
}
if (pkg == null && activePackage == null) {
return false;
}
return !pkg.equals(activePackage);
}
代码示例来源:origin: org.kie.workbench.stunner/kie-wb-common-stunner-project-api
@Override
public boolean equals(Object o) {
if (o instanceof ProjectMetadataImpl) {
ProjectMetadataImpl other = (ProjectMetadataImpl) o;
return super.equals(other) &&
(null != moduleName) ? moduleName.equals(other.moduleName) : null == other.moduleName &&
(null != projectPkg) ? projectPkg.equals(other.projectPkg) : null == other.projectPkg &&
(null != overview) ? overview.equals(other.overview) : null == other.overview;
}
return false;
}
代码示例来源:origin: org.kie.workbench.screens/kie-wb-common-project-explorer-backend
private List<FolderItem> getSegmentSiblings(final Package pkg) {
final List<FolderItem> result = new ArrayList<>();
final Package parentPkg = moduleService.resolveParentPackage(pkg);
if (parentPkg == null) {
return emptyList();
}
final Set<Package> siblings = moduleService.resolvePackages(parentPkg);
if (siblings != null && !siblings.isEmpty()) {
for (final Package sibling : siblings) {
if (!sibling.equals(pkg)) {
result.add(explorerServiceHelper.toFolderItem(sibling));
}
}
}
return result;
}
代码示例来源:origin: org.kie.workbench.screens/kie-wb-common-project-explorer-backend
public boolean hasAssets(final Package pkg) {
if (pkg == null) {
return false;
}
if (hasAssets(pkg.getPackageMainSrcPath())
|| hasAssets(pkg.getPackageTestSrcPath())
|| hasAssets(pkg.getPackageMainResourcesPath())
|| hasAssets(pkg.getPackageTestResourcesPath())) {
return true;
}
final Set<Package> childPackages = moduleService.resolvePackages(pkg);
for (final Package childPackage : childPackages) {
if (!childPackage.equals(pkg) && hasAssets(childPackage)) {
return true;
}
}
return false;
}
内容来源于网络,如有侵权,请联系作者删除!