Example usage for org.apache.commons.lang ObjectUtils equals

List of usage examples for org.apache.commons.lang ObjectUtils equals

Introduction

In this page you can find the example usage for org.apache.commons.lang ObjectUtils equals.

Prototype

public static boolean equals(Object object1, Object object2) 

Source Link

Document

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 

Usage

From source file:com.employee.scheduler.nurserostering.solver.move.ShiftAssignmentSwapMove.java

public boolean isMoveDoable(ScoreDirector scoreDirector) {
    return !ObjectUtils.equals(leftShiftAssignment.getEmployee(), rightShiftAssignment.getEmployee());
}

From source file:com.eyeq.pivot4j.mdx.MemberParameter.java

/**
 * @see com.eyeq.pivot4j.mdx.ExpressionParameter#setResult(java.lang.String)
 *//*w w w .  j  a v  a  2s .com*/
@Override
public void setResult(String result) {
    boolean changed = !ObjectUtils.equals(getResult(), result);

    super.setResult(result);

    if (changed) {
        this.member = null;
    }
}

From source file:er.extensions.components.ERXHyperlinkKeyValueSetter.java

public boolean disabled() {
    Object val = valueForBinding("binding");
    return ObjectUtils.equals(val, valueForBinding("value"));
}

From source file:com.opengamma.analytics.financial.instrument.index.Generator.java

@Override
public boolean equals(Object obj) {
    if (this == obj) {
        return true;
    }/*from w w  w .  j a v  a  2  s .c  om*/
    if (obj == null) {
        return false;
    }
    if (getClass() != obj.getClass()) {
        return false;
    }
    Generator other = (Generator) obj;
    if (!ObjectUtils.equals(_name, other._name)) {
        return false;
    }
    return true;
}

From source file:com.pyxis.jira.monitoring.UserIssueActivity.java

@Override
public boolean equals(Object obj) {

    if (!(obj instanceof UserIssueActivity)) {
        return false;
    }//w w  w. ja va2  s.com

    UserIssueActivity rhs = (UserIssueActivity) obj;

    return ObjectUtils.equals(getUserName(), rhs.getUserName())
            && ObjectUtils.equals(getIssue().getKey(), rhs.getIssue().getKey());
}

From source file:com.opengamma.analytics.math.interpolation.data.InterpolatorNDDataBundle.java

@Override
public boolean equals(final Object obj) {
    if (this == obj) {
        return true;
    }/*  www.  j a va2s.c o  m*/
    if (!(obj instanceof InterpolatorNDDataBundle)) {
        return false;
    }
    final InterpolatorNDDataBundle other = (InterpolatorNDDataBundle) obj;
    if (!ObjectUtils.equals(_data, other._data)) {
        return false;
    }
    return true;
}

From source file:com.opengamma.masterdb.security.hibernate.ExternalIdBean.java

@Override
public boolean equals(Object other) {
    if (other == null) {
        return false;
    }//ww  w .  j a v  a2  s.com
    if (other == this) {
        return true;
    }
    if (!(other instanceof ExternalIdBean)) {
        return false;
    }
    ExternalIdBean otherBean = (ExternalIdBean) other;
    return ObjectUtils.equals(otherBean.getScheme(), getScheme())
            && ObjectUtils.equals(otherBean.getIdentifier(), getIdentifier());
}

From source file:com.opengamma.financial.convention.ConventionSearchRequest.java

@Override
public boolean equals(final Object obj) {
    if (this == obj) {
        return true;
    }/*from w w  w  .  j ava 2 s  .  c  o  m*/
    if (!(obj instanceof ConventionSearchRequest)) {
        return false;
    }
    final ConventionSearchRequest other = (ConventionSearchRequest) obj;
    return ObjectUtils.equals(_identifiers, other._identifiers);
}

From source file:com.employee.scheduler.nurserostering.solver.move.EmployeeMultipleChangeMove.java

public boolean isMoveDoable(ScoreDirector scoreDirector) {
    return !ObjectUtils.equals(fromEmployee, toEmployee);
}

From source file:de.schildbach.game.common.SingleCoordinateMove.java

@Override
public boolean equals(Object obj) {
    SingleCoordinateMove other = (SingleCoordinateMove) obj;
    return ObjectUtils.equals(this.coordinate, other.coordinate);
}