本文整理汇总了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);
}
示例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;
}
}
示例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);
}
示例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);
}
示例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);
}
示例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;
}
示例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;
}
}
示例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;
}
}
示例9: equals
import gov.nih.nci.cagrid.common.Utils; //导入方法依赖的package包/类
public boolean equals(Object x, Object y) throws HibernateException {
return Utils.equals(x, y);
}