當前位置: 首頁>>代碼示例>>Java>>正文


Java EqualsBuilder.append方法代碼示例

本文整理匯總了Java中org.apache.commons.lang.builder.EqualsBuilder.append方法的典型用法代碼示例。如果您正苦於以下問題:Java EqualsBuilder.append方法的具體用法?Java EqualsBuilder.append怎麽用?Java EqualsBuilder.append使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.apache.commons.lang.builder.EqualsBuilder的用法示例。


在下文中一共展示了EqualsBuilder.append方法的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.append方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。