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

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

Introduction

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

Prototype

@Deprecated
public static boolean equals(final Object object1, final 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.mirth.connect.model.ArchiveMetaData.java

public boolean equals(Object that) {
    if (this == that) {
        return true;
    }//from  www .  ja va2 s. c o m

    if (!(that instanceof ArchiveMetaData)) {
        return false;
    }

    ArchiveMetaData transport = (ArchiveMetaData) that;

    return ObjectUtils.equals(this.getType(), transport.getType());
}

From source file:com.github.htfv.utils.el.SinglePropertyContainer.java

@Override
public boolean containsProperty(final Object property) {
    return ObjectUtils.equals(property, this.property);
}

From source file:com.alliander.osgp.shared.hibernate.CustomUserType.java

@SuppressWarnings("all")
@Override/*from www .  j  a  v a 2s  .c  om*/
public boolean equals(final Object x, final Object y) {
    return ObjectUtils.equals(x, y);
}

From source file:com.github.htfv.utils.el.SinglePropertyContainer.java

@Override
public Object getProperty(final Object property) {
    if (ObjectUtils.equals(property, this.property)) {
        return value;
    }/*  ww  w .  ja  va2  s . c  om*/

    return null;
}

From source file:com.strandls.alchemy.webservices.auth.SimpleAuthenticationService.java

@Override
public boolean authenticate(final String userName, final String password) {
    return ObjectUtils.equals(userName, "Administrator") && ObjectUtils.equals(password, "0000");
}

From source file:de.bund.bva.pliscommon.persistence.usertype.AbstractImmutableUserType.java

/**
 * {@inheritDoc}/*from   w w w  .j a va2 s .  c  om*/
 */
public boolean equals(Object x, Object y) throws HibernateException {
    return ObjectUtils.equals(x, y);
}

From source file:com.magnet.max.android.tests.testsubjects.model.SubModel.java

@Override
public boolean equals(Object object) {
    if (null == object) {
        return false;
    }/*from w w w.j  a  va 2s .c  o m*/

    SubModel theOther = (SubModel) object;
    return ObjectUtils.equals(intAttribute, theOther.getIntAttribute())
            && ObjectUtils.equals(stringAttribute, theOther.getStringAttribute());
}

From source file:com.mirth.connect.client.core.IgnoredComponent.java

public boolean equals(Object that) {
    if (this == that) {
        return true;
    }//from   w  ww . j a  v  a  2s . c  o  m

    if (!(that instanceof IgnoredComponent)) {
        return false;
    }

    IgnoredComponent ignoredComponent = (IgnoredComponent) that;

    return ObjectUtils.equals(this.getName(), ignoredComponent.getName())
            && ObjectUtils.equals(this.getVersion(), ignoredComponent.getVersion());
}

From source file:com.esri.geoevent.test.performance.jaxb.AbstractTest.java

@Override
public boolean equals(Object obj) {
    if (obj == null || !(obj instanceof AbstractTest))
        return false;

    AbstractTest test = (AbstractTest) obj;
    if (!ObjectUtils.equals(getType(), test.getType()))
        return false;

    return true;//from   w ww.  ja v  a  2 s .com
}

From source file:com.github.htfv.utils.el.SinglePropertyContainer.java

@Override
public boolean mayContainProperty(final Object property) {
    return ObjectUtils.equals(property, this.property);
}