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.haulmont.cuba.gui.data.impl.testmodel1.TestMasterEntity.java
public void setDetails(Set<TestDetailEntity> details) { Set<TestDetailEntity> o = this.details; this.details = details; if (!ObjectUtils.equals(o, details)) propertyChanged("details", o, details); }
From source file:com.opengamma.masterdb.security.hibernate.UniqueIdBean.java
@Override public boolean equals(Object other) { if (other == null) { return false; }/*from ww w . j a v a2 s . c o m*/ if (other == this) { return true; } if (!(other instanceof UniqueIdBean)) { return false; } UniqueIdBean otherBean = (UniqueIdBean) other; return ObjectUtils.equals(otherBean.getScheme(), getScheme()) && ObjectUtils.equals(otherBean.getIdentifier(), getIdentifier()); }
From source file:com.haulmont.cuba.web.toolkit.ui.CubaColorPicker.java
@Override protected void setInternalValue(Object newValue) { if (!ObjectUtils.equals(field.getColor(), newValue)) { field.setColor((Color) newValue); }/*w w w . j a v a 2s .co m*/ super.setInternalValue(newValue); }
From source file:com.opengamma.analytics.financial.var.parametric.DeltaMeanCalculator.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 DeltaMeanCalculator other = (DeltaMeanCalculator) obj; return ObjectUtils.equals(_algebra, other._algebra); }
From source file:de.codesourcery.jasm16.ast.RegisterReferenceNode.java
@Override public boolean equals(Object obj) { if (obj == this) { return true; }/*ww w. ja v a2s.c o m*/ if (obj instanceof RegisterReferenceNode) { final RegisterReferenceNode other = (RegisterReferenceNode) obj; return ObjectUtils.equals(this.register, other.register) && this.hasPostIncrement == other.hasPostIncrement && this.hasPreDecrement == other.hasPreDecrement; } return false; }
From source file:com.haulmont.cuba.gui.components.validators.LongValidator.java
private boolean checkPositive(Long value) { return !ObjectUtils.equals("true", onlyPositive) || value != null && value >= 0; }
From source file:com.haulmont.cuba.gui.data.impl.testmodel1.TestDetailEntity.java
public void setMaster(TestMasterEntity master) { TestMasterEntity o = this.master; this.master = master; if (!ObjectUtils.equals(o, master)) propertyChanged("master", o, master); }
From source file:com.ebay.cloud.cms.entmgr.entity.impl.AbstractEntityFieldMerger.java
protected boolean compareFieldSingleValue(boolean isRelation, Object found, Object given) { if (isRelation) { String foundId = ((IEntity) found).getId(); String givenId = ((IEntity) given).getId(); return ObjectUtils.equals(foundId, givenId); } else {/* w ww .j av a2 s .com*/ return ObjectUtils.equals(found, given); } }
From source file:courtscheduler.solver.move.MatchChangeMove.java
@Override public boolean isMoveDoable(ScoreDirector scoreDirector) { // cannot move to same position // see http://docs.jboss.org/drools/release/6.0.0.CR5/optaplanner-docs/html/moveAndNeighborhoodSelection.html#d0e5896 return !ObjectUtils.equals(toMatch.getMatchSlot().getDay(), matchSlot.getDay()) || !ObjectUtils.equals(toMatch.getMatchSlot().getTime(), matchSlot.getTime()) || !ObjectUtils.equals(toMatch.getMatchSlot().getCourt(), matchSlot.getCourt()); }
From source file:com.eyeq.pivot4j.ui.condition.AxisCondition.java
/** * @see com.eyeq.pivot4j.ui.condition.Condition#matches(com.eyeq.pivot4j.ui.RenderContext) */// w w w. j a va 2 s . c o m @Override public boolean matches(RenderContext context) { if (axis == null) { throw new IllegalStateException("Axis is not specified."); } return ObjectUtils.equals(axis, context.getAxis()); }