Example usage for java.util Objects equals

List of usage examples for java.util Objects equals

Introduction

In this page you can find the example usage for java.util Objects equals.

Prototype

public static boolean equals(Object a, Object b) 

Source Link

Document

Returns true if the arguments are equal to each other and false otherwise.

Usage

From source file:com.vsct.dt.strowgr.admin.nsq.payload.CommitFailed.java

@Override
public boolean equals(Object o) {
    if (this == o)
        return true;
    if (o == null || getClass() != o.getClass())
        return false;
    CommitFailed that = (CommitFailed) o;
    return Objects.equals(header, that.header);
}

From source file:common.Bike.java

@Override
public boolean equals(Object obj) {
    if (obj == null) {
        return false;
    }// w w  w  .j a  va2  s .  c  om
    if (getClass() != obj.getClass()) {
        return false;
    }
    final Bike other = (Bike) obj;
    if (!Objects.equals(this.serialNum, other.serialNum)) {
        return false;
    }
    return true;
}

From source file:com.vsct.dt.strowgr.admin.nsq.payload.CommitCompleted.java

@Override
public boolean equals(Object o) {
    if (this == o)
        return true;
    if (o == null || getClass() != o.getClass())
        return false;
    CommitCompleted that = (CommitCompleted) o;
    return Objects.equals(header, that.header);
}

From source file:com.tyro.oss.pact.spring4.pact.provider.ConsumerFilter.java

public boolean shouldExcludePact(Class<?> clazz) {
    PactDefinition pactDefinition = AnnotationUtils.findAnnotation(clazz, PactDefinition.class);
    boolean pactShouldBeIncluded = isBlank(consumerToInclude)
            || Objects.equals(consumerFrom(pactDefinition), consumerToInclude);
    return !pactShouldBeIncluded;
}

From source file:org.hawkular.client.metrics.model.TenantParam.java

@Override
public boolean equals(Object o) {
    if (this == o)
        return true;
    if (o == null || getClass() != o.getClass())
        return false;
    TenantParam that = (TenantParam) o;/*from  w ww .  ja v  a  2 s  . c o  m*/
    return Objects.equals(id, that.id);
}

From source file:com.yahoo.elide.datastores.hibernate3.usertypes.JsonType.java

/**
 * {@inheritDoc}//from   ww  w.j a  v a  2s.  co  m
 */
@Override
public boolean equals(Object firstObject, Object secondObject) throws HibernateException {

    return Objects.equals(firstObject, secondObject);
}

From source file:com.josue.kingdom.rest.TenantResource.java

@Override
public boolean equals(Object obj) {
    if (obj == null) {
        return false;
    }/*from www .j  a  v a  2 s . co  m*/
    if (getClass() != obj.getClass()) {
        return false;
    }
    final TenantResource other = (TenantResource) obj;
    return Objects.equals(this.application, other.application);
}

From source file:xyz.cloudbans.entities.data.Realm.java

@Override
public boolean equals(Object o) {
    if (this == o)
        return true;
    if (!(o instanceof Realm))
        return false;
    Realm that = (Realm) o;/*from   www  .  j a  va2 s  .c o m*/
    return Objects.equals(getUrlName(), that.getUrlName()) && Objects.equals(getName(), that.getName());
}

From source file:com.inkubator.hrm.web.converter.PaySalaryComponentFormulaConverter.java

@Override
public String getAsString(FacesContext context, UIComponent component, Object value) {
    ResourceBundle resourceBundle = ResourceBundle.getBundle("Messages",
            new Locale(FacesUtil.getSessionAttribute(HRMConstant.BAHASA_ACTIVE).toString()));

    String messages = StringUtils.EMPTY;
    Integer data = (Integer) value;
    if (Objects.equals(data, 1)) {
        messages = resourceBundle.getString("paySalaryComponent.paySalaryComponent_tunjangan");
    } else if (Objects.equals(data, -1)) {
        messages = resourceBundle.getString("paySalaryComponent.paySalaryComponent_potongan");
    } else if (Objects.equals(data, 0)) {
        messages = resourceBundle.getString("paySalaryComponent.paySalaryComponent_subsidi");
    }// www  .  j  a  v a2  s .com
    return messages;
}