List of usage examples for org.apache.commons.lang ObjectUtils equals
public static boolean equals(Object object1, Object object2)
Compares two objects for equality, where either one or both objects may be null
.
ObjectUtils.equals(null, null) = true ObjectUtils.equals(null, "") = false ObjectUtils.equals("", null) = false ObjectUtils.equals("", "") = true ObjectUtils.equals(Boolean.TRUE, null) = false ObjectUtils.equals(Boolean.TRUE, "true") = false ObjectUtils.equals(Boolean.TRUE, Boolean.TRUE) = true ObjectUtils.equals(Boolean.TRUE, Boolean.FALSE) = false
From source file:com.tesora.dve.sql.node.structural.SortingSpecification.java
@Override protected boolean schemaSelfEqual(LanguageNode other) { SortingSpecification oss = (SortingSpecification) other; if ((direction && oss.direction) || (!direction && !oss.direction)) { return !ObjectUtils.equals(ordering, oss.ordering); }//from w w w . j ava 2s. com return false; }
From source file:com.opengamma.analytics.financial.instrument.index.GeneratorFRA.java
@Override public boolean equals(final Object obj) { if (this == obj) { return true; }// w ww. jav a 2 s . c om if (!super.equals(obj)) { return false; } if (getClass() != obj.getClass()) { return false; } final GeneratorFRA other = (GeneratorFRA) obj; if (!ObjectUtils.equals(_iborIndex, other._iborIndex)) { return false; } if (!ObjectUtils.equals(_calendar, other._calendar)) { return false; } return true; }
From source file:gr.abiss.calipso.domain.ValidationExpression.java
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (!(obj instanceof ValidationExpression)) { return false; }//from www .j a v a 2 s. c om ValidationExpression other = (ValidationExpression) obj; if (ObjectUtils.equals(getId(), other.getId())) { return true; } if (ObjectUtils.equals(getName(), other.getName())) { return true; } return false; }
From source file:com.ocs.dynamo.functional.domain.Domain.java
@Override public boolean equals(Object obj) { if (this == obj) { return true; }// w w w. j a v a 2 s . c o m if (!(obj instanceof Domain)) { return false; } if (!this.getClass().equals(obj.getClass())) { return false; } Domain other = (Domain) obj; if (this.id != null && other.id != null) { // first, check if the IDs match return ObjectUtils.equals(this.id, other.id); } else { // if this is not the case, check for code and type return ObjectUtils.equals(this.code, other.code); } }
From source file:be.fedict.eid.pkira.blm.model.ca.CertificateChainCertificate.java
@Override public boolean equals(Object obj) { if (obj == null || !(obj instanceof CertificateChainCertificate)) { return false; }/*from w ww.j ava 2 s . c o m*/ CertificateChainCertificate other = (CertificateChainCertificate) obj; return ObjectUtils.equals(issuer, other.issuer) && ObjectUtils.equals(serialNumber, other.serialNumber) && ObjectUtils.equals(subject, other.subject); }
From source file:com.seitenbau.jenkins.plugins.dynamicparameter.CascadingChoiceParameterValues.java
/** * Get the parameter being referenced/*w w w .ja va2 s . c om*/ * @return CascadingChoiceParameterDefinition the parameter instance. */ @SuppressWarnings("rawtypes") public final CascadingChoiceParameterDefinition getProperty() { AbstractProject _project = getProject(); List<ParameterDefinition> parameterDefinitions = JenkinsUtils.getProjectParameterDefinitions(_project); for (ParameterDefinition pd : parameterDefinitions) { if (pd instanceof CascadingChoiceParameterDefinition) { CascadingChoiceParameterDefinition parameterDefinition = (CascadingChoiceParameterDefinition) pd; String pdName = parameterDefinition.getName(); if (ObjectUtils.equals(pdName, this.getPropertyName())) { return parameterDefinition; } } } return null; }
From source file:com.opengamma.analytics.financial.simpleinstruments.derivative.SimpleFXFuture.java
@Override public boolean equals(final Object obj) { if (this == obj) { return true; }/* w ww . j a v a2 s . co m*/ if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } SimpleFXFuture other = (SimpleFXFuture) obj; if (Double.doubleToLongBits(_expiry) != Double.doubleToLongBits(other._expiry)) { return false; } if (Double.doubleToLongBits(_referencePrice) != Double.doubleToLongBits(other._referencePrice)) { return false; } if (Double.doubleToLongBits(_settlement) != Double.doubleToLongBits(other._settlement)) { return false; } if (Double.doubleToLongBits(_unitAmount) != Double.doubleToLongBits(other._unitAmount)) { return false; } if (!ObjectUtils.equals(_payCurrency, other._payCurrency)) { return false; } if (!ObjectUtils.equals(_receiveCurrency, other._receiveCurrency)) { return false; } return true; }
From source file:com.opengamma.analytics.financial.instrument.inflation.CouponInflationDefinition.java
@Override public boolean equals(final Object obj) { if (this == obj) { return true; }//from w w w.java2 s . com if (!super.equals(obj)) { return false; } if (getClass() != obj.getClass()) { return false; } final CouponInflationDefinition other = (CouponInflationDefinition) obj; if (!ObjectUtils.equals(_indexPrice, other._indexPrice)) { return false; } return true; }
From source file:jef.tools.Assert.java
/** * // ww w .j av a2 s . c o m * @param obj1 * @param obj2 * @param string */ public static void equals(Object obj1, Object obj2, String string) { if (!ObjectUtils.equals(obj1, obj2)) throw new RuntimeException(string); }
From source file:com.opengamma.analytics.financial.model.option.definition.EuropeanOptionOnEuropeanVanillaOptionDefinition.java
@Override public boolean equals(final Object obj) { if (this == obj) { return true; }// ww w. j a v a 2 s . co m if (!super.equals(obj)) { return false; } if (getClass() != obj.getClass()) { return false; } final EuropeanOptionOnEuropeanVanillaOptionDefinition other = (EuropeanOptionOnEuropeanVanillaOptionDefinition) obj; return ObjectUtils.equals(_underlyingOption, other._underlyingOption); }