本文整理了Java中javax.naming.Reference.hashCode
方法的一些代码示例,展示了Reference.hashCode
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Reference.hashCode
方法的具体详情如下:
包路径:javax.naming.Reference
类名称:Reference
方法名:hashCode
暂无
代码示例来源:origin: com.addc/addc-base
/**
* @see java.lang.Object#hashCode()
*/
@Override
public int hashCode() {
final int prime= 31;
int result= super.hashCode();
result= prime * result + initialContextFactory.hashCode();
result= prime * result + (loginRequired ? 1231 : 1237);
result= prime * result + providerURL.hashCode();
return result;
}
代码示例来源:origin: org.fusesource.fabric.bridge/fabric-bridge
@Override
public int hashCode() {
int val = 0;
val += (brokerUrl != null) ? brokerUrl.hashCode() : 0;
val += maxConnections;
val += (userName != null) ? userName.hashCode() : 0;
val += (password != null) ? password.hashCode() : 0;
val += (clientId != null) ? clientId.hashCode() : 0;
val += (connectionFactoryRef != null) ? connectionFactoryRef.hashCode() : 0;
val += (destinationResolverRef != null) ? destinationResolverRef.hashCode() : 0;
if (connectionFactory != null) {
try {
val += ((Referenceable)connectionFactory).getReference().hashCode();
} catch (NamingException e) {
throw new IllegalArgumentException("Could not get Reference from ConnectionFactory: "
+ e.getMessage(), e);
}
}
return val;
}
内容来源于网络,如有侵权,请联系作者删除!