本文整理汇总了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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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;
}
示例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();
}