类org.apache.commons.lang.builder.EqualsBuilder源码实例Demo

下面列出了怎么用org.apache.commons.lang.builder.EqualsBuilder的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: amazon-ecs-plugin   文件: ECSTaskTemplateTest.java
@Test
public void shouldMerge() throws Exception {

    ECSTaskTemplate parent = getParent();
    ECSTaskTemplate child = getChild("parent");

    ECSTaskTemplate expected = new ECSTaskTemplate(
        "child-name", "child-label",
        null, null, "child-image", "child-repository-credentials", "EC2", "child-network-mode", "child-remoteFSRoot",
        false, null, 0, 0, 0, null, null, false, false,
        "child-containerUser", null, null, null, null, null, null, null, null, null, 0);


    ECSTaskTemplate result = child.merge(parent);
    assertTrue(EqualsBuilder.reflectionEquals(expected, result));
}
 
源代码2 项目: phoenicis   文件: ShortcutCreationDTO.java
@Override
public boolean equals(Object o) {
    if (this == o) {
        return true;
    }

    if (o == null || getClass() != o.getClass()) {
        return false;
    }

    ShortcutCreationDTO that = (ShortcutCreationDTO) o;

    return new EqualsBuilder()
            .append(name, that.name)
            .append(category, that.category)
            .append(description, that.description)
            .append(icon, that.icon)
            .append(miniature, that.miniature)
            .append(executable, that.executable)
            .isEquals();
}
 
源代码3 项目: phoenicis   文件: TeeRepository.java
@Override
public boolean equals(Object o) {
    if (this == o) {
        return true;
    }

    if (o == null || getClass() != o.getClass()) {
        return false;
    }

    TeeRepository that = (TeeRepository) o;

    return new EqualsBuilder()
            .append(leftRepository, that.leftRepository)
            .append(rightRepository, that.rightRepository)
            .isEquals();
}
 
源代码4 项目: phoenicis   文件: EngineDTO.java
@Override
public boolean equals(Object o) {
    if (this == o) {
        return true;
    }

    if (o == null || getClass() != o.getClass()) {
        return false;
    }

    EngineDTO engineDTO = (EngineDTO) o;

    return new EqualsBuilder()
            .append(category, engineDTO.category)
            .append(subCategory, engineDTO.subCategory)
            .append(version, engineDTO.version)
            .append(userData, engineDTO.userData)
            .isEquals();
}
 
源代码5 项目: cougar   文件: Foo.java
public boolean equals(Object o) {
    if (!(o instanceof Foo)) {
        return false;
    }

    if (this == o) {
        return true;
    }
    Foo another = (Foo)o;

    return new EqualsBuilder()
        .append(fooName, another.fooName)
        .append(bar, another.bar)
        .append(barBazMap, another.barBazMap)
        .append(primitiveArray, another.primitiveArray)
        .isEquals();
}
 
源代码6 项目: kfs   文件: PurapAccountRevisionGroup.java
/**
 * Overridden so that group by statement can be easily implemented.
 * <li>DO NOT REMOVE this method, it is critical to reconciliation process</li>
 * 
 * @see java.lang.Object#equals(java.lang.Object)
 */
@Override
public boolean equals(Object obj) {
    if (this == obj) {
        return true;
    }
    if (obj == null || !PurapAccountRevisionGroup.class.isAssignableFrom(obj.getClass())) {
        return false;
    }
    PurapAccountRevisionGroup test = (PurapAccountRevisionGroup) obj;
    EqualsBuilder equalsBuilder = new EqualsBuilder();
    equalsBuilder.append(this.postingYear, test.getPostingYear());
    equalsBuilder.append(itemIdentifier, test.getItemIdentifier());
    equalsBuilder.append(replaceFiller(chartOfAccountsCode), replaceFiller(test.getChartOfAccountsCode()));
    equalsBuilder.append(replaceFiller(accountNumber), replaceFiller(test.getAccountNumber()));
    equalsBuilder.append(replaceFiller(subAccountNumber), replaceFiller(test.getSubAccountNumber()));
    equalsBuilder.append(replaceFiller(financialObjectCode), replaceFiller(test.getFinancialObjectCode()));
    equalsBuilder.append(replaceFiller(financialSubObjectCode), replaceFiller(test.getFinancialSubObjectCode()));
    equalsBuilder.append(replaceFiller(postingPeriodCode), replaceFiller(test.getPostingPeriodCode()));
    equalsBuilder.append(replaceFiller(projectCode), replaceFiller(test.getProjectCode()));
    equalsBuilder.append(replaceFiller(organizationReferenceId), replaceFiller(test.getOrganizationReferenceId()));
    return equalsBuilder.isEquals();
}
 
源代码7 项目: freehealth-connector   文件: TherapeuticLink.java
public boolean equals(Object obj) {
   if (obj == null) {
      return false;
   } else if (!(obj instanceof TherapeuticLink)) {
      return false;
   } else if (obj == this) {
      return true;
   } else {
      TherapeuticLink other = (TherapeuticLink)obj;
      EqualsBuilder builder = new EqualsBuilder();
      builder.append(this.comment, other.comment);
      builder.append(this.endDate, other.endDate);
      builder.append(this.hcParty, other.hcParty);
      builder.append(this.patient, other.patient);
      builder.append(this.startDate, other.startDate);
      builder.append(this.status, other.status);
      return builder.isEquals();
   }
}
 
源代码8 项目: googleads-java-lib   文件: DateTimesTest.java
/** Asserts that two API date times are equal. */
private static void assertEquals(
    com.google.api.ads.admanager.jaxws.v201911.DateTime expected,
    com.google.api.ads.admanager.jaxws.v201911.DateTime actual) {
  boolean equals =
      expected == actual
          || new EqualsBuilder()
              .append(expected.getDate().getYear(), actual.getDate().getYear())
              .append(expected.getDate().getMonth(), actual.getDate().getMonth())
              .append(expected.getDate().getDay(), actual.getDate().getDay())
              .append(expected.getHour(), actual.getHour())
              .append(expected.getMinute(), actual.getMinute())
              .append(expected.getSecond(), actual.getSecond())
              .append(
                  DateTimeZone.forTimeZone(TimeZone.getTimeZone(expected.getTimeZoneId()))
                      .toTimeZone()
                      .getRawOffset(),
                  DateTimeZone.forTimeZone(TimeZone.getTimeZone(actual.getTimeZoneId()))
                      .toTimeZone()
                      .getRawOffset())
              .isEquals();
  Assert.assertTrue(
      String.format("Expected: <%s> Actual: <%s>", toString(expected), toString(actual)), equals);
}
 
源代码9 项目: CodeDefenders   文件: Mutant.java
@Override
public boolean equals(Object o) {
    if (this == o) return true;

    if (o == null || getClass() != o.getClass()) return false;

    Mutant mutant = (Mutant) o;

    return new EqualsBuilder()
            .append(id, mutant.id)
            .append(gameId, mutant.gameId)
            .append(playerId, mutant.playerId)
            .append(javaFile, mutant.javaFile)
            .append(md5, mutant.md5)
            .append(classFile, mutant.classFile)
            .isEquals();
}
 
源代码10 项目: cloudstack   文件: SecurityRule.java
@Override
public boolean equals(final Object obj) {
    if (obj == null) {
        return false;
    }
    if (obj == this) {
        return true;
    }
    if (!(obj instanceof SecurityRule)) {
        return false;
    }
    final SecurityRule another = (SecurityRule) obj;
    return new EqualsBuilder()
            .append(ethertype, another.ethertype)
            .append(ipPrefix, another.ipPrefix)
            .append(portRangeMin, another.portRangeMin)
            .append(portRangeMax, another.portRangeMax)
            .append(profileUuid, another.profileUuid)
            .append(protocol, another.protocol)
            .isEquals();
}
 
源代码11 项目: parceler   文件: CircularReferenceTest.java
@Override
public boolean equals(Object o) {
    if (this == o) return true;
    if (!(o instanceof Ten)) return false;

    Ten ten = (Ten) o;

    return EqualsBuilder.reflectionEquals(this, ten, new String[]{"nine"});
}
 
源代码12 项目: cougar   文件: RandomException.java
public boolean equals(Object o) {
    boolean equal = false;

    if (o instanceof RandomException) {
        return new EqualsBuilder().append(getMessage(), ((RandomException)o).getMessage()).isEquals();
    }
    return equal;

}
 
源代码13 项目: maven-replacer-plugin   文件: ReplacerMojoTest.java
private BaseMatcher<List<Replacement>> replacementOf(final String xpath, final String value, 
		final boolean unescape, final String... tokens) {
	return new BaseMatcher<List<Replacement>>() {
		@SuppressWarnings("unchecked")
		public boolean matches(Object arg0) {
			List<Replacement> replacements = (List<Replacement>) arg0;
			for (int i=0; i < tokens.length; i++) {
				Replacement replacement = replacements.get(i);
				EqualsBuilder equalsBuilder = new EqualsBuilder();
				equalsBuilder.append(tokens[i], replacement.getToken());
				equalsBuilder.append(value, replacement.getValue());
				equalsBuilder.append(unescape, replacement.isUnescape());
				equalsBuilder.append(xpath, replacement.getXpath());
				
				boolean equals = equalsBuilder.isEquals();
				if (!equals) {
					return false;
				}
			}
			return true;
		}

		public void describeTo(Description desc) {
			desc.appendText("tokens").appendValue(Arrays.asList(tokens));
			desc.appendText("value").appendValue(value);
			desc.appendText("unescape").appendValue(unescape);
		}
	};
}
 
源代码14 项目: spacewalk   文件: ScriptResult.java
/**
 * {@inheritDoc}
 */
public boolean equals(Object obj) {
    if (obj == null || !(obj instanceof ScriptResult)) {
        return false;
    }

    ScriptResult r = (ScriptResult) obj;

    return new EqualsBuilder().append(this.getActionScriptId(), r.getActionScriptId())
                              .append(this.getServerId(), r.getServerId())
                              .append(this.getStartDate(), r.getStartDate())
                              .append(this.getStopDate(), r.getStopDate())
                              .append(this.getReturnCode(), r.getReturnCode())
                              .isEquals();
}
 
源代码15 项目: pentaho-metadata   文件: FieldTypeSettings.java
public boolean equals( Object obj ) {
  if ( obj instanceof FieldTypeSettings == false ) {
    return false;
  }
  if ( this == obj ) {
    return true;
  }
  FieldTypeSettings rhs = (FieldTypeSettings) obj;
  return new EqualsBuilder().append( type, rhs.type ).isEquals();
}
 
源代码16 项目: kfs   文件: TemSourceAccountingLine.java
/**
 * Override needed for PURAP GL entry creation (hjs) - please do not add "amount" to this method
 *
 * @see java.lang.Object#equals(java.lang.Object)
 */
@Override
public boolean equals(Object obj) {
    if (obj == null || !(obj instanceof AccountingLine)) {
        return false;
    }
    AccountingLine accountingLine = (AccountingLine) obj;
    return new EqualsBuilder().append(this.getChartOfAccountsCode(), accountingLine.getChartOfAccountsCode()).append(this.getAccountNumber(), accountingLine.getAccountNumber()).append(this.getSubAccountNumber(), accountingLine.getSubAccountNumber()).append(this.getFinancialObjectCode(), accountingLine.getFinancialObjectCode()).append(this.getFinancialSubObjectCode(), accountingLine.getFinancialSubObjectCode()).append(this.getProjectCode(), accountingLine.getProjectCode()).append(this.getOrganizationReferenceId(), accountingLine.getOrganizationReferenceId()).append(this.getAmount(), accountingLine.getAmount()).isEquals();
}
 
源代码17 项目: lams   文件: CrNodeVersion.java
/** Two CrNodeVersions are equal if their NvId field is the same */
   @Override
   public boolean equals(Object other) {
if ((this == other)) {
    return true;
}
if (!(other instanceof CrNodeVersion)) {
    return false;
}
CrNodeVersion castOther = (CrNodeVersion) other;
return new EqualsBuilder().append(this.getNvId(), castOther.getNvId()).isEquals();
   }
 
源代码18 项目: rice   文件: ActionListAction.java
@Override
public boolean equals(Object o) {
    if (!(o instanceof PartitionKey)) {
        return false;
    }
    PartitionKey key = (PartitionKey) o;
    EqualsBuilder builder = new EqualsBuilder();
    builder.append(applicationId, key.applicationId);
    builder.append(customActionListAttributeNames, key.customActionListAttributeNames);
    return builder.isEquals();
}
 
源代码19 项目: daf-kylo   文件: Operational.java
@Override
public boolean equals(Object other) {
    if (other == this) {
        return true;
    }
    if ((other instanceof Operational) == false) {
        return false;
    }
    Operational rhs = ((Operational) other);
    return new EqualsBuilder().append(isStd, rhs.isStd).append(subtheme, rhs.subtheme).append(groupOwn, rhs.groupOwn).append(logicalUri, rhs.logicalUri).append(storageInfo, rhs.storageInfo).append(ingestionPipeline, rhs.ingestionPipeline).append(inputSrc, rhs.inputSrc).append(readType, rhs.readType).append(theme, rhs.theme).append(additionalProperties, rhs.additionalProperties).append(datasetType, rhs.datasetType).append(physicalUri, rhs.physicalUri).isEquals();
}
 
源代码20 项目: dddsample-core   文件: RouteSpecification.java
@Override
public boolean sameValueAs(final RouteSpecification other) {
  return other != null && new EqualsBuilder().
    append(this.origin, other.origin).
    append(this.destination, other.destination).
    append(this.arrivalDeadline, other.arrivalDeadline).
    isEquals();
}
 
源代码21 项目: pentaho-metadata   文件: ConceptPropertyNumber.java
public boolean equals( Object obj ) {
  if ( obj instanceof ConceptPropertyNumber == false ) {
    return false;
  }
  if ( this == obj ) {
    return true;
  }
  ConceptPropertyNumber rhs = (ConceptPropertyNumber) obj;
  return new EqualsBuilder().append( value, rhs.value ).isEquals();
}
 
源代码22 项目: reef   文件: DistributedDataSetPartition.java
@Override
public boolean equals(final Object obj) {
  if (obj == this) {
    return true;
  }
  if (!(obj instanceof DistributedDataSetPartition)) {
    return false;
  }
  final DistributedDataSetPartition that = (DistributedDataSetPartition) obj;
  return new EqualsBuilder().append(this.path, that.path).append(this.location, that.location)
      .append(this.desiredSplits, that.desiredSplits).isEquals();
}
 
源代码23 项目: spacewalk   文件: ActionType.java
/**
 * {@inheritDoc}
 */
public boolean equals(Object o) {
    if (o == null || !(o instanceof ActionType)) {
        return false;
    }
    ActionType other = (ActionType)o;
    return new EqualsBuilder().append(this.getId(), other.getId())
                              .append(this.getName(), other.getName())
                              .append(this.getLabel(), other.getLabel())
                              .append(this.getTriggersnapshot(),
                                      other.getTriggersnapshot())
                              .append(this.getUnlockedonly(), other.getUnlockedonly())
                              .isEquals();
}
 
源代码24 项目: apiman-plugins   文件: HeaderAllowDenyBean.java
@Override
public boolean equals(Object other) {
    if (other == this) {
        return true;
    }
    if (!(other instanceof HeaderAllowDenyBean)) {
        return false;
    }
    final HeaderAllowDenyBean rhs = ((HeaderAllowDenyBean) other);
    return new EqualsBuilder()
            .append(entries, rhs.entries)
            .isEquals();
}
 
源代码25 项目: rice   文件: DocumentSecurityServiceImpl.java
@Override
public boolean equals(Object o) {
    if (!(o instanceof PartitionKey)) {
        return false;
    }
    PartitionKey key = (PartitionKey) o;
    EqualsBuilder builder = new EqualsBuilder();
    builder.append(applicationId, key.applicationId);
    builder.append(documentSecurityAttributeNames, key.documentSecurityAttributeNames);
    return builder.isEquals();
}
 
@Override
public boolean equals(Object other) {
    if (other == this) {
        return true;
    }
    if ((other instanceof ExonToTranscriptRelationship) == false) {
        return false;
    }
    ExonToTranscriptRelationship rhs = ((ExonToTranscriptRelationship) other);
    return new EqualsBuilder().append(subject, rhs.subject).append(object, rhs.object).isEquals();
}
 
源代码27 项目: parceler   文件: CircularReferenceTest.java
@Override
public boolean equals(Object o) {
    if (this == o) return true;
    if (!(o instanceof Five)) return false;
    Five five = (Five) o;
    return EqualsBuilder.reflectionEquals(this, five, new String[]{"a", "b", "c"});
}
 
源代码28 项目: biolink-model   文件: OrganismTaxon.java
@Override
public boolean equals(Object other) {
    if (other == this) {
        return true;
    }
    if ((other instanceof OrganismTaxon) == false) {
        return false;
    }
    OrganismTaxon rhs = ((OrganismTaxon) other);
    return new EqualsBuilder().isEquals();
}
 
源代码29 项目: gitlab-plugin   文件: MergeRequestChangedLabels.java
@Override
public boolean equals(Object o) {
    if (this == o) {
        return true;
    }
    if (o == null || getClass() != o.getClass()) {
        return false;
    }
    MergeRequestChangedLabels that = (MergeRequestChangedLabels) o;
    return new EqualsBuilder()
        .append(previous, that.previous)
        .append(current, that.current)
        .isEquals();
}
 
源代码30 项目: biolink-model   文件: NoncodingRNAProduct.java
@Override
public boolean equals(Object other) {
    if (other == this) {
        return true;
    }
    if ((other instanceof NoncodingRNAProduct) == false) {
        return false;
    }
    NoncodingRNAProduct rhs = ((NoncodingRNAProduct) other);
    return new EqualsBuilder().isEquals();
}
 
 类所在包
 同包方法