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.opengamma.analytics.financial.model.interestrate.definition.G2ppPiecewiseConstantDataBundle.java
@Override public boolean equals(final Object obj) { if (this == obj) { return true; }/*from www . ja v a 2s .co m*/ if (!super.equals(obj)) { return false; } if (!(obj instanceof G2ppPiecewiseConstantDataBundle)) { return false; } final G2ppPiecewiseConstantDataBundle other = (G2ppPiecewiseConstantDataBundle) obj; if (!ObjectUtils.equals(_parameters, other._parameters)) { return false; } return true; }
From source file:com.opengamma.analytics.financial.var.NormalLinearVaRCalculator.java
@Override public boolean equals(final Object obj) { if (this == obj) { return true; }//from w w w.j a v a2 s. com if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final NormalLinearVaRCalculator<?> other = (NormalLinearVaRCalculator<?>) obj; if (!ObjectUtils.equals(_meanCalculator, other._meanCalculator)) { return false; } if (!ObjectUtils.equals(_stdCalculator, other._stdCalculator)) { return false; } return true; }
From source file:edu.umd.cfar.lamp.chronicle.DefaultChronicleDataModel.java
public Object set(int i, TimeLine tqe) { Object old = timeLines.set(i, tqe); if (ObjectUtils.equals(old, tqe)) { return old; }/*from ww w . j ava2s . c o m*/ fireTimeLinesChanged(); return old; }
From source file:com.opengamma.analytics.financial.forex.derivative.ForexSwap.java
@Override public boolean equals(final Object obj) { if (this == obj) { return true; }/*from ww w. j av a 2 s . c o m*/ if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final ForexSwap other = (ForexSwap) obj; if (!ObjectUtils.equals(_farLeg, other._farLeg)) { return false; } if (!ObjectUtils.equals(_nearLeg, other._nearLeg)) { return false; } return true; }
From source file:com.opengamma.analytics.financial.model.volatility.curve.BlackForexTermStructureParameters.java
@Override public boolean equals(final Object obj) { if (this == obj) { return true; }/*w w w . j a va2 s.c o m*/ if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final BlackForexTermStructureParameters other = (BlackForexTermStructureParameters) obj; if (!ObjectUtils.equals(_volatility, other._volatility)) { return false; } return true; }
From source file:com.ocs.dynamo.filter.Between.java
@Override public boolean equals(Object obj) { // Only objects of the same class can be equal if (obj == null || !getClass().equals(obj.getClass())) { return false; }/*from w w w . j a v a 2s . co m*/ final Between o = (Between) obj; return ObjectUtils.equals(propertyId, o.getPropertyId()) && ObjectUtils.equals(startValue, o.getStartValue()) && ObjectUtils.equals(endValue, o.getEndValue()); }
From source file:com.opengamma.financial.comparison.TradeInfo.java
@Override public boolean equals(final Object o) { if (o == this) { return true; }/*w w w. ja va 2 s. c om*/ if (!(o instanceof TradeInfo)) { return false; } final TradeInfo other = (TradeInfo) o; return equalsImpl(other) && ObjectUtils.equals(getCounterparty(), other.getCounterparty()) && ObjectUtils.equals(getTradeDate(), other.getTradeDate()) && ObjectUtils.equals(getTradeTime(), other.getTradeTime()) && ObjectUtils.equals(getPremium(), other.getPremium()) && ObjectUtils.equals(getPremiumCurrency(), other.getPremiumCurrency()) && ObjectUtils.equals(getPremiumDate(), other.getPremiumDate()) && ObjectUtils.equals(getPremiumTime(), other.getPremiumTime()) && ObjectUtils.equals(getAttributes(), other.getAttributes()); }
From source file:gov.nih.nci.cabig.caaers.domain.StudyIntervention.java
@Override public boolean equals(Object o) { if (o == null) return false; if (o == this) return true; if (!(o instanceof StudyIntervention)) return false; StudyIntervention that = (StudyIntervention) o; if (getId() != null && ObjectUtils.equals(getId(), that.getId())) return true; if (getStudy() != null && that.getStudy() != null && !getStudy().equals(that.getStudy())) return false; return true;//from w w w . ja va2s .c o m }
From source file:net.sourceforge.jukebox.model.ContentModel.java
@Override public final boolean equals(final Object other) { if (other == null || this.getClass() != other.getClass()) { return false; }/* w w w . j av a 2 s . com*/ return ObjectUtils.equals(this.absoluteFileName, ((ContentModel) other).absoluteFileName) && ObjectUtils.equals(this.displayName, ((ContentModel) other).displayName) && ObjectUtils.equals(this.recentUpdate, ((ContentModel) other).recentUpdate); }
From source file:com.haulmont.cuba.gui.data.impl.testmodel1.TestDetailEntity.java
public void setParts(Set<TestPartEntity> parts) { Set<TestPartEntity> o = this.parts; this.parts = parts; if (!ObjectUtils.equals(o, parts)) propertyChanged("parts", o, parts); }