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.option.definition.YieldCurveWithBlackCubeBundle.java
@Override public boolean equals(final Object obj) { if (this == obj) { return true; }//ww w. ja va 2s .co m if (!super.equals(obj)) { return false; } if (getClass() != obj.getClass()) { return false; } final YieldCurveWithBlackCubeBundle other = (YieldCurveWithBlackCubeBundle) obj; if (!ObjectUtils.equals(_parameters, other._parameters)) { return false; } return true; }
From source file:com.opengamma.analytics.financial.interestrate.ParRateNodeSensitivityCalculator.java
@Override public boolean equals(final Object obj) { if (this == obj) { return true; }//w w w. j av a 2s . co m if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final ParRateNodeSensitivityCalculator other = (ParRateNodeSensitivityCalculator) obj; return ObjectUtils.equals(_parRateSensitivityCalculator, other._parRateSensitivityCalculator); }
From source file:com.tesora.dve.sql.node.expression.ActualLiteralExpression.java
@Override protected boolean schemaSelfEqual(LanguageNode other) { if (!super.schemaSelfEqual(other)) return false; ActualLiteralExpression ale = (ActualLiteralExpression) other; return ObjectUtils.equals(this.value, ale.value); }
From source file:com.vmware.identity.idm.IdentityStoreSchemaMapping.java
@Override public boolean equals(Object obj) { if (this == obj) { return true; }//from w w w.j a va 2s .c o m if (obj == null || this.getClass() != obj.getClass()) { return false; } IdentityStoreSchemaMapping other = (IdentityStoreSchemaMapping) obj; return ObjectUtils.equals(_storeObjects, other._storeObjects); }
From source file:com.opengamma.analytics.math.surface.Surface.java
@Override public boolean equals(final Object obj) { if (this == obj) { return true; }/*from w ww . j a v a2s .c om*/ if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final Surface<?, ?, ?> other = (Surface<?, ?, ?>) obj; return ObjectUtils.equals(_name, other._name); }
From source file:com.opengamma.financial.analytics.volatility.cube.SwaptionVolatilityCubeSpecification.java
@Override public boolean equals(final Object obj) { if (this == obj) { return true; }/*from w ww . jav a2 s . c o m*/ if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final SwaptionVolatilityCubeSpecification other = (SwaptionVolatilityCubeSpecification) obj; if (!ObjectUtils.equals(_name, other._name)) { return false; } if (!ObjectUtils.equals(_target, other._target)) { return false; } if (!ObjectUtils.equals(_cubeInstrumentProvider, other._cubeInstrumentProvider)) { return false; } if (!ObjectUtils.equals(_cubeQuoteType, other._cubeQuoteType)) { return false; } if (!ObjectUtils.equals(_quoteUnits, other._quoteUnits)) { return false; } return true; }
From source file:com.vaadin.addon.jpacontainer.demo.domain.AbstractItem.java
@Override public boolean equals(Object obj) { if (obj.getClass() == getClass()) { AbstractItem o = (AbstractItem) obj; return ObjectUtils.equals(description, o.description) && ObjectUtils.equals(quantity, o.quantity) && ObjectUtils.equals(price, o.price); }/* w w w . ja v a 2 s. c o m*/ return false; }
From source file:com.healthmarketscience.jackcess.RowFilter.java
/** * Creates a filter based on a single value row pattern. * * @param columnPattern column to be matched * @param valuePattern value to be matched. * A table row will match the target if * {@code ObjectUtils.equals(valuePattern, row.get(columnPattern.getName()))}. * @return a filter which matches table rows which match the value in the * row pattern/* w w w .j a va2 s. c o m*/ */ public static RowFilter matchPattern(final Column columnPattern, final Object valuePattern) { return new RowFilter() { @Override public boolean matches(Map<String, Object> row) { return ObjectUtils.equals(valuePattern, columnPattern.getRowValue(row)); } }; }
From source file:de.fu_berlin.inf.dpp.activities.PermissionActivity.java
@Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; if (!(obj instanceof PermissionActivity)) return false; PermissionActivity other = (PermissionActivity) obj; if (this.permission != other.permission) return false; if (!ObjectUtils.equals(this.affectedUser, other.affectedUser)) return false; return true;/* w ww .ja v a 2s. c om*/ }
From source file:com.opengamma.analytics.math.curve.Curve.java
@Override public boolean equals(final Object obj) { if (this == obj) { return true; }//from w ww . j av a 2 s.com if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final Curve<?, ?> other = (Curve<?, ?>) obj; return ObjectUtils.equals(_name, other._name); }