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


Java EqualsBuilder.isEquals方法代码示例

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


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

示例1: equals

import org.apache.commons.lang.builder.EqualsBuilder; //导入方法依赖的package包/类
@Override
public boolean equals(final Object obj) {
    if (!(obj instanceof Authentication)) {
        return false;
    }
    if (obj == this) {
        return true;
    }
    final Authentication other = (Authentication) obj;
    final EqualsBuilder builder = new EqualsBuilder();
    builder.append(this.principal, other.getPrincipal());
    builder.append(this.credentials, other.getCredentials());
    builder.append(this.successes, other.getSuccesses());
    builder.append(this.authenticatedDate, other.getAuthenticatedDate().getTime());
    builder.append(wrap(this.attributes), other.getAttributes());
    builder.append(wrap(this.failures), other.getFailures());
    return builder.isEquals();
}
 
开发者ID:luotuo,项目名称:cas4.0.x-server-wechat,代码行数:19,代码来源:ImmutableAuthentication.java

示例2: equals

import org.apache.commons.lang.builder.EqualsBuilder; //导入方法依赖的package包/类
@Override
public boolean equals(final Object obj) {
    if (!(obj instanceof HandlerResult)) {
        return false;
    }
    if (obj == this) {
        return true;
    }
    final HandlerResult other = (HandlerResult) obj;
    final EqualsBuilder builder = new EqualsBuilder();
    builder.append(this.handlerName, other.handlerName);
    builder.append(this.credentialMetaData, other.credentialMetaData);
    builder.append(this.principal, other.principal);
    builder.append(this.warnings, other.warnings);
    return builder.isEquals();
}
 
开发者ID:luotuo,项目名称:cas4.0.x-server-wechat,代码行数:17,代码来源:HandlerResult.java

示例3: equals

import org.apache.commons.lang.builder.EqualsBuilder; //导入方法依赖的package包/类
@Override
public boolean equals(Object object) {
	if (object == null) {
		return false;
	}
	if (getClass() != object.getClass()) {
		return false;
	}
	if (this == object) {
		return true;
	}

	Policy other = (Policy) object;
	EqualsBuilder builder = new EqualsBuilder().append(getName(), other.getName()).append(getId(), other.getId());

	Long mcId = this.applianceManagerConnector != null ? this.applianceManagerConnector.getId() : null;
	Long otherMcId = other.getApplianceManagerConnector() != null ? other.getApplianceManagerConnector().getId()
			: null;
	builder.append(mcId, otherMcId);

	return builder.isEquals();
}
 
开发者ID:opensecuritycontroller,项目名称:osc-core,代码行数:23,代码来源:Policy.java

示例4: equals

import org.apache.commons.lang.builder.EqualsBuilder; //导入方法依赖的package包/类
@Override
   public boolean equals(Object other) {
if ((this == other)) {
    return true;
}
if (!(other instanceof CompletedActivityProgress)) {
    return false;
}
CompletedActivityProgress castOther = (CompletedActivityProgress) other;

EqualsBuilder eq = new EqualsBuilder();
eq.append(this.getActivity().getActivityId(), castOther.getActivity().getActivityId());
eq.append(this.getLearnerProgress().getLearnerProgressId(),
	castOther.getLearnerProgress().getLearnerProgressId());
return eq.isEquals();
   }
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:17,代码来源:CompletedActivityProgress.java

示例5: equals

import org.apache.commons.lang.builder.EqualsBuilder; //导入方法依赖的package包/类
@Override
   public boolean equals(Object other) {
if ((this == other)) {
    return true;
}
if (!(other instanceof CompletedActivityProgressArchive)) {
    return false;
}
CompletedActivityProgressArchive castOther = (CompletedActivityProgressArchive) other;

EqualsBuilder eq = new EqualsBuilder();
eq.append(this.getActivity().getActivityId(), castOther.getActivity().getActivityId());
eq.append(this.getLearnerProgress().getLearnerProgressId(),
	castOther.getLearnerProgress().getLearnerProgressId());
return eq.isEquals();
   }
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:17,代码来源:CompletedActivityProgressArchive.java

示例6: equals

import org.apache.commons.lang.builder.EqualsBuilder; //导入方法依赖的package包/类
@Override
public boolean equals(final Object obj) {

    if (obj instanceof PolicyEvaluationRequestV1) {
        final PolicyEvaluationRequestV1 other = (PolicyEvaluationRequestV1) obj;
        EqualsBuilder equalsBuilder = new EqualsBuilder();

        // Element by element comparison may produce true negative in Sets so use built in equals
        // From AbstractSet's (HashSet's ancestor) documentation
        // This implementation first checks if the specified object is this set; if so it returns true.
        // Then, it checks if the specified object is a set whose size is identical to the size of this set;
        // if not, it returns false. If so, it returns containsAll((Collection) o).
        equalsBuilder.append(this.subjectAttributes, other.subjectAttributes);
        equalsBuilder.append(this.policySetsEvaluationOrder, other.policySetsEvaluationOrder);

        equalsBuilder.append(this.action, other.action).append(this.resourceIdentifier, other.resourceIdentifier)
                .append(this.subjectIdentifier, other.subjectIdentifier);
        return equalsBuilder.isEquals();
    }
    return false;
}
 
开发者ID:eclipse,项目名称:keti,代码行数:22,代码来源:PolicyEvaluationRequestV1.java

示例7: equals

import org.apache.commons.lang.builder.EqualsBuilder; //导入方法依赖的package包/类
@Override
public boolean equals(final Object other) {
    if (!(other instanceof BasicCredentialMetaData)) {
        return false;
    }
    final BasicCredentialMetaData md = (BasicCredentialMetaData) other;
    final EqualsBuilder builder = new EqualsBuilder();
    builder.append(this.id, md.id);
    builder.append(this.credentialClass, md.credentialClass);
    return builder.isEquals();
}
 
开发者ID:luotuo,项目名称:cas4.0.x-server-wechat,代码行数:12,代码来源:BasicCredentialMetaData.java


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