下面列出了怎么用org.apache.commons.lang3.builder.EqualsBuilder的API类实例代码及写法,或者点击链接到github查看源代码。
@Override
public boolean equals(final Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
if (!super.equals(o)) {
return false;
}
DefaultIssuesTableRow that = (DefaultIssuesTableRow) o;
EqualsBuilder builder = new EqualsBuilder();
builder.append(getCategory(), that.getCategory())
.append(getType(), that.getType());
return builder.isEquals();
}
@Override
public boolean equals(Object obj) {
if (obj == null) {
return false;
}
if (obj == this) {
return true;
}
if (obj.getClass() != getClass()) {
return false;
}
IssueMultiUpdatedContent rhs = (IssueMultiUpdatedContent) obj;
return new EqualsBuilder()
.append(this.txId, rhs.txId)
.append(this.comment, rhs.comment)
.append(this.link, rhs.link)
.append(this.changes, rhs.changes)
.isEquals();
}
@Override
public boolean equals(Object obj)
{
if (obj == this)
{
return true;
}
else if (obj == null || obj.getClass() != getClass())
{
return false;
}
CompressionParameters cp = (CompressionParameters) obj;
return new EqualsBuilder()
.append(sstableCompressor, cp.sstableCompressor)
.append(chunkLength, cp.chunkLength)
.append(otherOptions, cp.otherOptions)
.isEquals();
}
public final boolean equals(@Nullable Object obj) {
if (obj == null) {
return false;
}
if (obj == this) {
return true;
}
if (obj.getClass() != getClass()) {
return false;
}
User rhs = (User) obj;
return new EqualsBuilder()
.append(id, rhs.id)
.append(name, rhs.name)
.isEquals();
}
@Override
public boolean equals(Object obj) {
if (obj == null) {
return false;
}
if (obj == this) {
return true;
}
if (obj.getClass() != getClass()) {
return false;
}
MetricTimeSeries rhs = (MetricTimeSeries) obj;
return new EqualsBuilder()
.append(this.getMetric(), rhs.getMetric())
.isEquals();
}
@Override
public boolean equals(Object other) {
if (this == other) {
return true;
}
if (other == null || getClass() != other.getClass()) {
return false;
}
RegionReplicaInfo that = (RegionReplicaInfo) other;
return new EqualsBuilder()
.append(row, that.row)
.append(regionInfo, that.regionInfo)
.append(regionState, that.regionState)
.append(serverName, that.serverName)
.append(seqNum, that.seqNum)
.append(targetServerName, that.targetServerName)
.append(mergeRegionInfo, that.mergeRegionInfo)
.append(splitRegionInfo, that.splitRegionInfo)
.isEquals();
}
@Override
public boolean equals(Object obj) {
if (obj == null) {
return false;
}
if (obj == this) {
return true;
}
if (obj.getClass() != getClass()) {
return false;
}
IssueCommentedActivity rhs = (IssueCommentedActivity) obj;
return new EqualsBuilder()
.append(this.type, rhs.type)
.append(this.content, rhs.content)
.isEquals();
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || ResourceIdentifier.class != o.getClass()) return false;
ResourceIdentifier that = (ResourceIdentifier) o;
return new EqualsBuilder()
.append(resourceName, that.resourceName)
.append(groupName, that.groupName)
.append(webServerName, that.webServerName)
.append(jvmName, that.jvmName)
.append(webAppName, that.webAppName)
.isEquals();
}
public boolean equals(Object obj) {
if (obj == null) {
return false;
}
if (obj == this) {
return true;
}
if (obj.getClass() != getClass()) {
return false;
}
Info other = (Info) obj;
EqualsBuilder builder = new EqualsBuilder();
builder.append(pk, other.pk);
builder.append(content, other.content);
return builder.isEquals();
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (!(o instanceof MongoClientDetails)) return false;
MongoClientDetails that = (MongoClientDetails) o;
return new EqualsBuilder()
.append(clientId, that.clientId)
.append(scope, that.scope)
.append(resourceIds, that.resourceIds)
.append(authorizedGrantTypes, that.authorizedGrantTypes)
.append(registeredRedirectUris, that.registeredRedirectUris)
.append(authorities, that.authorities)
.append(accessTokenValiditySeconds, that.accessTokenValiditySeconds)
.append(refreshTokenValiditySeconds, that.refreshTokenValiditySeconds)
.append(additionalInformation, that.additionalInformation)
.append(autoApproveScopes, that.autoApproveScopes)
.isEquals();
}
@Override
public boolean equals(Object obj) {
if (obj == null) {
return false;
}
if (obj == this) {
return true;
}
if (obj.getClass() != getClass()) {
return false;
}
Owner rhs = (Owner) obj;
return new EqualsBuilder().append(username, rhs.username).append(authType, rhs.authType).isEquals();
}
@Override
public boolean equals(Object obj) {
if (obj == null) {
return false;
}
if (obj == this) {
return true;
}
if (obj.getClass() != getClass()) {
return false;
}
FileDeletedActivity rhs = (FileDeletedActivity) obj;
return new EqualsBuilder()
.append(this.type, rhs.type)
.append(this.content, rhs.content)
.isEquals();
}
@Override
public boolean equals(Object obj) {
if (obj == null) {
return false;
}
if (obj == this) {
return true;
}
if (obj.getClass() != getClass()) {
return false;
}
Frequency rhs = (Frequency) obj;
return new EqualsBuilder()
.append(this.windowSize, rhs.windowSize)
.append(this.windowThreshold, rhs.windowThreshold)
.isEquals();
}
@Override
public boolean equals(final Object obj) {
if (obj == null) {
return false;
}
if (obj == this) {
return true;
}
if (obj.getClass() != getClass()) {
return false;
}
final RegisteredServicePublicKeyImpl rhs = (RegisteredServicePublicKeyImpl) obj;
return new EqualsBuilder()
.append(this.location, rhs.location)
.append(this.algorithm, rhs.algorithm)
.isEquals();
}
@Override
public boolean equals(Object obj) {
if (obj == null) {
return false;
}
if (obj == this) {
return true;
}
if (obj.getClass() != getClass()) {
return false;
}
PullRequestContent rhs = (PullRequestContent) obj;
return new EqualsBuilder()
.append(this.id, rhs.id)
.append(this.number, rhs.number)
.append(this.summary, rhs.summary)
.append(this.description, rhs.description)
.append(this.comment, rhs.comment)
.append(this.changes, rhs.changes)
.append(this.repository, rhs.repository)
.isEquals();
}
@Override
public boolean equals(final Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
final AbstractStartEndBean other = (AbstractStartEndBean) obj;
return new EqualsBuilder().
append(start, other.start).
append(end, other.end).
build();
}
@Override
public boolean equals(Object obj) {
if (obj == null) {
return false;
}
if (obj == this) {
return true;
}
if (obj.getClass() != getClass()) {
return false;
}
FileUpdatedContent rhs = (FileUpdatedContent) obj;
return new EqualsBuilder()
.append(this.id, rhs.id)
.append(this.name, rhs.name)
.append(this.dir, rhs.dir)
.append(this.size, rhs.size)
.isEquals();
}
@Override
public boolean equals(Object obj){
if(obj == this) {
return true;
}
if(!(obj instanceof SimpleCell)) {
return false;
}
SimpleCell that = (SimpleCell)obj;
EqualsBuilder builder = new EqualsBuilder();
builder.append(value, that.value);
builder.append(lineNumber, that.lineNumber);
builder.append(cellStyle, that.cellStyle);
return builder.isEquals();
}
@Override
public boolean equals(final Object obj) {
if (obj == null) {
return false;
}
if (obj == this) {
return true;
}
if (obj.getClass() != getClass()) {
return false;
}
final DefaultRegisteredServiceAccessStrategy rhs = (DefaultRegisteredServiceAccessStrategy) obj;
return new EqualsBuilder()
.append(this.enabled, rhs.enabled)
.append(this.ssoEnabled, rhs.ssoEnabled)
.append(this.requireAllAttributes, rhs.requireAllAttributes)
.append(this.requiredAttributes, rhs.requiredAttributes)
.isEquals();
}
@Override
public boolean equals(Object obj) {
if (obj == null) {
return false;
}
if (obj == this) {
return true;
}
if (obj.getClass() != getClass()) {
return false;
}
PortNumberRule rhs = (PortNumberRule) obj;
return new EqualsBuilder()
.append(this.port, rhs.port)
.append(this.error, rhs.error)
.append(this.nullable, rhs.nullable)
.isEquals();
}
@Override
public boolean equals(final Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
AccessTokenTO other = (AccessTokenTO) obj;
return new EqualsBuilder().
append(key, other.key).
append(body, other.body).
append(expiryTime, other.expiryTime).
append(owner, other.owner).
build();
}
@Override
public boolean equals(final Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
final PrivilegeCond other = (PrivilegeCond) obj;
return new EqualsBuilder().
append(privilege, other.privilege).
build();
}
@Override
public boolean equals(Object object) {
if (this == object) {
return true;
}
if (object == null) {
return false;
}
if (getClass() != object.getClass()) {
return false;
} else {
RmsPropLearner that = (RmsPropLearner) object;
EqualsBuilder equal = new EqualsBuilder();
equal.append(this.rmsDecay, that.rmsDecay);
equal.append(this.epsilon, that.epsilon);
equal.append(this.learnSchedule, that.learnSchedule);
return equal.isEquals();
}
}
@Override
public boolean equals(Object object) {
if (this == object) {
return true;
}
if (object == null) {
return false;
}
if (getClass() != object.getClass()) {
return false;
} else {
MixtureDensityLossFunction that = (MixtureDensityLossFunction) object;
EqualsBuilder equal = new EqualsBuilder();
equal.append(this.mixtures, that.mixtures);
equal.append(this.marks, that.marks);
return equal.isEquals();
}
}
@Override
public boolean equals(final Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
final ConnConfPropSchema other = (ConnConfPropSchema) obj;
return new EqualsBuilder().
append(name, other.name).
append(type, other.type).
append(required, other.required).
append(order, other.order).
append(confidential, other.confidential).
build();
}
@Override
public boolean equals(Object obj) {
if (obj == null) {
return false;
}
if (obj == this) {
return true;
}
if (obj.getClass() != getClass()) {
return false;
}
Result rhs = (Result) obj;
return new EqualsBuilder()
.append(vertexCount, rhs.vertexCount)
.append(averageLocalClusteringCoefficient, rhs.averageLocalClusteringCoefficient)
.isEquals();
}
@Override
public boolean equals(Object obj) {
if(this == obj) {
return true;
}
if(!(obj instanceof ServiceName)) {
return false;
}
ServiceName that = (ServiceName)obj;
EqualsBuilder builder = new EqualsBuilder();
builder.append(StringUtils.lowerCase(environment), StringUtils.lowerCase(that.environment));
builder.append(serviceName, that.serviceName);
return builder.isEquals();
}
@Override
public boolean equals(Object obj) {
if (obj == null) {
return false;
}
if (obj == this) {
return true;
}
if (obj.getClass() != getClass()) {
return false;
}
GitRepositoryCreatedContent rhs = (GitRepositoryCreatedContent) obj;
return new EqualsBuilder()
.append(this.repository, rhs.repository)
.isEquals();
}
@Override
public boolean equals(Object obj) {
if (obj == null) { return false; }
if (obj == this) { return true; }
if (obj.getClass() != getClass()) { return false; }
CampaignNegativeLocationsReport other = (CampaignNegativeLocationsReport) obj;
return new EqualsBuilder()
.appendSuper(super.equals(obj))
.append(accountCurrencyCode, other.accountCurrencyCode)
.append(accountDescriptiveName, other.accountDescriptiveName)
.append(accountTimeZone, other.accountTimeZone)
.append(baseCampaignId, other.baseCampaignId)
.append(campaignId, other.campaignId)
.append(campaignName, other.campaignName)
.append(campaignStatus, other.campaignStatus)
.append(customerDescriptiveName, other.customerDescriptiveName)
.append(id, other.id)
.append(isNegative, other.isNegative)
.isEquals();
}
@Override
public boolean equals(Object obj) {
if (obj == null) {
return false;
}
if (obj == this) {
return true;
}
if (obj.getClass() != getClass()) {
return false;
}
Result rhs = (Result) obj;
return new EqualsBuilder()
.append(tripletCount, rhs.tripletCount)
.append(triangleCount, rhs.triangleCount)
.isEquals();
}