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.vmware.identity.idm.IdentityStoreAttributeMapping.java
@Override public boolean equals(Object obj) { if (this == obj) { return true; }/* w ww .ja va 2 s . c om*/ if (obj == null || this.getClass() != obj.getClass()) { return false; } IdentityStoreAttributeMapping other = (IdentityStoreAttributeMapping) obj; return ObjectUtils.equals(_attributeId, other._attributeId) && ObjectUtils.equals(_attributeName, other._attributeName); }
From source file:com.opengamma.analytics.financial.provider.curve.CurveBuildingBlockBundle.java
@Override public boolean equals(final Object obj) { if (this == obj) { return true; }//from w w w.jav a2s .com if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final CurveBuildingBlockBundle other = (CurveBuildingBlockBundle) obj; if (!ObjectUtils.equals(_bundle, other._bundle)) { return false; } return true; }
From source file:com.opengamma.analytics.financial.model.option.definition.OptionDataBundle.java
@Override public boolean equals(final Object obj) { if (this == obj) { return true; }/* w w w. j a v a2 s. co m*/ if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final OptionDataBundle other = (OptionDataBundle) obj; if (!ObjectUtils.equals(_volatilitySurface, other._volatilitySurface)) { return false; } if (!ObjectUtils.equals(_interestRateCurve, other._interestRateCurve)) { return false; } return ObjectUtils.equals(_date, other._date); }
From source file:de.fu_berlin.inf.dpp.activities.serializable.TextSelectionActivityDataObject.java
@Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; if (!(obj instanceof TextSelectionActivityDataObject)) return false; TextSelectionActivityDataObject activity = (TextSelectionActivityDataObject) obj; return (this.offset == activity.offset) && (this.length == activity.length) && (ObjectUtils.equals(this.path, activity.path)); }
From source file:com.ocs.dynamo.dao.SortOrder.java
@Override public boolean equals(Object obj) { if (this == obj) { return true; }//from w w w . java 2 s . co m if (!(obj instanceof SortOrder)) { return false; } SortOrder that = (SortOrder) obj; return ObjectUtils.equals(this.direction, that.direction) && ObjectUtils.equals(this.property, that.property); }
From source file:com.opengamma.analytics.financial.provider.curve.SingleCurveBundle.java
@Override public boolean equals(final Object obj) { if (this == obj) { return true; }//from www . j av a 2s .c o m if (obj == null) { return false; } if (!(obj instanceof SingleCurveBundle)) { return false; } final SingleCurveBundle<?> other = (SingleCurveBundle<?>) obj; if (_size != other._size) { return false; } if (!ObjectUtils.equals(_curveName, other._curveName)) { return false; } if (!Arrays.equals(_startingPoints, other._startingPoints)) { return false; } if (!Arrays.deepEquals(_derivatives, other._derivatives)) { return false; } if (!ObjectUtils.equals(_curveGenerator, other._curveGenerator)) { return false; } return true; }
From source file:dz.alkhwarizmix.framework.java.dtos.email.model.vo.EMailList.java
@Override public boolean equals(Object other) { boolean result = (getObjectAsThisClass(other) != null) && ObjectUtils.equals(this.list, getObjectAsThisClass(other).list); return result; }
From source file:com.opengamma.analytics.financial.instrument.swap.SwapDefinition.java
@Override public boolean equals(final Object obj) { if (this == obj) { return true; }/*w ww . java 2 s .c o m*/ if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final SwapDefinition other = (SwapDefinition) obj; if (!ObjectUtils.equals(_firstLeg, other._firstLeg)) { return false; } if (!ObjectUtils.equals(_secondLeg, other._secondLeg)) { return false; } return true; }
From source file:com.haulmont.cuba.web.gui.components.WebLookupPickerField.java
protected void initValueSync(final ComboBox selectComponent, final WebPickerField.Picker picker) { selectComponent.addValueChangeListener(new Property.ValueChangeListener() { @Override/*from w ww . j a v a 2 s . com*/ public void valueChange(Property.ValueChangeEvent event) { if (updateComponentValue) return; updateComponentValue = true; if (!ObjectUtils.equals(selectComponent.getValue(), picker.getValue())) { picker.setValueIgnoreReadOnly(selectComponent.getValue()); } updateComponentValue = false; } }); picker.addValueChangeListener(new Property.ValueChangeListener() { @Override public void valueChange(Property.ValueChangeEvent event) { if (updateComponentValue) return; updateComponentValue = true; if (!ObjectUtils.equals(selectComponent.getValue(), picker.getValue())) { selectComponent.setValueIgnoreReadOnly(picker.getValue()); } updateComponentValue = false; } }); }
From source file:dz.alkhwarizmix.framework.java.dtos.record.model.vo.RecordList.java
@Override public boolean equals(final Object other) { final boolean result = (getObjectAsThisClass(other) != null) && ObjectUtils.equals(list, getObjectAsThisClass(other).list); return result; }