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


Java Utils.equals方法代码示例

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


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

示例1: compareModels

import gov.nih.nci.cagrid.common.Utils; //导入方法依赖的package包/类
private static DomainModelComparisonResult compareModels(DomainModel goldModel, DomainModel testModel) {
    // project short name and version must match
    if (!Utils.equals(goldModel.getProjectShortName(), testModel.getProjectShortName())) {
        return new DomainModelComparisonResult("Project short names did not match: expected " 
            + goldModel.getProjectShortName() + " but was " + testModel.getProjectShortName(), false);
    }
    if (!Utils.equals(goldModel.getProjectVersion(), testModel.getProjectVersion())) {
        return new DomainModelComparisonResult("Project versions did not match: expected "
            + goldModel.getProjectVersion() + " but was " + testModel.getProjectVersion(), false);
    }
    
    // start comparing classes
    UMLClass[] goldClasses = goldModel.getExposedUMLClassCollection().getUMLClass();
    UMLClass[] testClasses = testModel.getExposedUMLClassCollection().getUMLClass();
    return compareClasses(goldClasses, testClasses);
}
 
开发者ID:NCIP,项目名称:cagrid-core,代码行数:17,代码来源:DomainModelComparator.java

示例2: equals

import gov.nih.nci.cagrid.common.Utils; //导入方法依赖的package包/类
public static boolean equals(ServiceSecurity ss, MethodSecurity ms) {
    if ((ss == null) && (ms == null)) {
        return true;
    } else if ((ss != null) && (ms == null)) {
        return false;
    } else if ((ss == null) && (ms != null)) {
        return false;
    } else if (!Utils.equals(ss.getSecuritySetting(), ms.getSecuritySetting())) {
        return false;
    } else if (!Utils.equals(ss.getAnonymousClients(), ms.getAnonymousClients())) {
        return false;
    } else if (!Utils.equals(ss.getSecureConversation(), ms.getSecureConversation())) {
        return false;
    } else if (!Utils.equals(ss.getSecureMessage(), ms.getSecureMessage())) {
        return false;
    } else if (!Utils.equals(ss.getTransportLevelSecurity(), ms.getTransportLevelSecurity())) {
        return false;
    } else if ((!Utils.equals(ss.getServiceAuthorization(), ms.getMethodAuthorization()))
        && (!Utils.equals(ss.getServiceAuthorization().getIntroducePDPAuthorization(), ms.getMethodAuthorization()
            .getIntroducePDPAuthorization()))) {
        return false;
    } else {
        return true;
    }
}
 
开发者ID:NCIP,项目名称:cagrid-core,代码行数:26,代码来源:CommonTools.java

示例3: compareSemanticMetadata

import gov.nih.nci.cagrid.common.Utils; //导入方法依赖的package包/类
private static DomainModelComparisonResult compareSemanticMetadata(String className, SemanticMetadata[] goldMetadata, SemanticMetadata[] testMetadata) {
    if (goldMetadata.length != testMetadata.length) {
        return new DomainModelComparisonResult(
            "Mismatched number of semantic metadata for class " + className 
            + ": expected " + goldMetadata.length + " but found " + testMetadata.length, false);
    }
    // turn into lists and sort metadata
    List<SemanticMetadata> goldList = Arrays.asList(goldMetadata);
    List<SemanticMetadata> testList = Arrays.asList(testMetadata);
    Comparator<SemanticMetadata> semanticComparator = new Comparator<SemanticMetadata>() {
        public int compare(SemanticMetadata md1, SemanticMetadata md2) {
            String s1 = getMetadataString(md1);
            String s2 = getMetadataString(md2);
            return s1.compareTo(s2);
        }
    };
    Collections.sort(goldList, semanticComparator);
    Collections.sort(testList, semanticComparator);
    for (int i = 0; i < goldList.size(); i++) {
        SemanticMetadata goldMd = goldList.get(i);
        SemanticMetadata testMd = testList.get(i);
        String goldString = getMetadataString(goldMd);
        String testString = getMetadataString(testMd);
        if (!Utils.equals(goldString, testString)) {
            return new DomainModelComparisonResult("Gold class " + className + " semantic metadata does not match test class semantic metadata", false);
        }
    }
    return new DomainModelComparisonResult("", true);
}
 
开发者ID:NCIP,项目名称:cagrid-core,代码行数:30,代码来源:DomainModelComparator.java

示例4: compareAttributes

import gov.nih.nci.cagrid.common.Utils; //导入方法依赖的package包/类
private static DomainModelComparisonResult compareAttributes(String className, UMLAttribute[] goldAttributes, UMLAttribute[] testAttributes) {
    if (goldAttributes.length != testAttributes.length) {
        return new DomainModelComparisonResult("Mismatched number of attributes for class " + className
            + ": expected " + goldAttributes.length + " but found " + testAttributes.length, false);
    }
    // list and sort
    List<UMLAttribute> goldList = Arrays.asList(goldAttributes);
    List<UMLAttribute> testList = Arrays.asList(testAttributes);
    Comparator<UMLAttribute> attributeComparator = new Comparator<UMLAttribute>() {
        public int compare(UMLAttribute a1, UMLAttribute a2) {
            String s1 = getAttributeString(a1);
            String s2 = getAttributeString(a2);
            return s1.compareTo(s2);
        }
    };
    Collections.sort(goldList, attributeComparator);
    Collections.sort(testList, attributeComparator);
    for (int i = 0; i < goldList.size(); i++) {
        UMLAttribute goldAtt = goldList.get(i);
        UMLAttribute testAtt = testList.get(i);
        String goldString = getAttributeString(goldAtt);
        String testString = getAttributeString(testAtt);
        if (!Utils.equals(goldString, testString)) {
            return new DomainModelComparisonResult("Gold attribute " + className + "." + goldAtt.getName() 
                + " did not match test attribute", false);
        }
    }
    return new DomainModelComparisonResult("", true);
}
 
开发者ID:NCIP,项目名称:cagrid-core,代码行数:30,代码来源:DomainModelComparator.java

示例5: servicePropertyClassDifferentFromDisplayed

import gov.nih.nci.cagrid.common.Utils; //导入方法依赖的package包/类
public boolean servicePropertyClassDifferentFromDisplayed() throws Exception {
    String propertyValue = null;
    if (CommonTools.servicePropertyExists(
        serviceInfo.getServiceDescriptor(), DataServiceConstants.QUERY_PROCESSOR_CLASS_PROPERTY)) {
        propertyValue = CommonTools.getServicePropertyValue(
            serviceInfo.getServiceDescriptor(), DataServiceConstants.QUERY_PROCESSOR_CLASS_PROPERTY);
    }
    String displayedValue = getSelectedClassName();
    return !Utils.equals(propertyValue, displayedValue);
}
 
开发者ID:NCIP,项目名称:cagrid-core,代码行数:11,代码来源:ClassBrowserPanel.java

示例6: isPackageInTable

import gov.nih.nci.cagrid.common.Utils; //导入方法依赖的package包/类
public boolean isPackageInTable(ModelPackage pack) {
    String packName = pack.getPackageName();
    String mappedNamespace = null;
    NamespaceType nsType = modelInfoUtil.getMappedNamespace(packName);
    if (nsType != null) {
        mappedNamespace = nsType.getNamespace();
    }
    for (int i = 0; i < getRowCount(); i++) {
        if (packName.equals(getValueAt(i, 0)) 
            && Utils.equals(mappedNamespace, getValueAt(i, 1))) {
            return true;
        }
    }
    return false;
}
 
开发者ID:NCIP,项目名称:cagrid-core,代码行数:16,代码来源:PackageToNamespaceTable.java

示例7: equals

import gov.nih.nci.cagrid.common.Utils; //导入方法依赖的package包/类
public boolean equals(Object obj) {
       if((obj!=null)&&(obj instanceof EncodedX509Certificate)){
    	   EncodedX509Certificate c = (EncodedX509Certificate)obj;
    	   return Utils.equals(getCertificate(), c.getCertificate());
       }else{
    	   return false;
       }
}
 
开发者ID:NCIP,项目名称:cagrid-core,代码行数:9,代码来源:EncodedX509Certificate.java

示例8: equals

import gov.nih.nci.cagrid.common.Utils; //导入方法依赖的package包/类
public boolean equals(Object obj) {
	if ((obj != null) && (obj instanceof EncodedX509Certificate)) {
		EncodedX509Certificate c = (EncodedX509Certificate) obj;
		return Utils.equals(getCertificate(), c.getCertificate());
	} else {
		return false;
	}
}
 
开发者ID:NCIP,项目名称:cagrid2,代码行数:9,代码来源:EncodedX509Certificate.java

示例9: equals

import gov.nih.nci.cagrid.common.Utils; //导入方法依赖的package包/类
public boolean equals(Object x, Object y) throws HibernateException {
    return Utils.equals(x, y);
}
 
开发者ID:NCIP,项目名称:cagrid-core,代码行数:4,代码来源:URIUserType.java


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