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.autodesk.client.model.JsonApiTypeId.java

@Override
public boolean equals(java.lang.Object o) {
    if (this == o) {
        return true;
    }/*from   w ww  .ja v a2 s.c  o m*/
    if (o == null || getClass() != o.getClass()) {
        return false;
    }
    JsonApiTypeId jsonApiTypeId = (JsonApiTypeId) o;
    return Objects.equals(this.id, jsonApiTypeId.id) && Objects.equals(this.type, jsonApiTypeId.type);
}

From source file:de.metas.procurement.webui.sync.SyncUserImportService.java

private User importUserNoSave(final BPartner bpartner, final SyncUser syncUser, User user) {
    final String uuid = syncUser.getUuid();
    if (user != null && !Objects.equals(uuid, user.getUuid())) {
        user = null;//from ww  w. ja v a  2  s  .c  o m
    }
    if (user == null) {
        user = new User();
        user.setUuid(uuid);
        user.setBpartner(bpartner);
    }

    user.markNotDeleted();
    user.setEmail(syncUser.getEmail().trim());
    // only sync the PW if not already set, e.g. by the forgot-password feature
    if (user.getPassword() == null || user.getPassword().trim().isEmpty()) {
        user.setPassword(syncUser.getPassword());
    }
    user.setLanguage(syncUser.getLanguage());
    // usersRepo.save(user); // don't save it
    logger.debug("Imported: {} -> {}", syncUser, user);

    return user;
}

From source file:com.autodesk.client.model.JsonApiVersionJsonapi.java

@Override
public boolean equals(java.lang.Object o) {
    if (this == o) {
        return true;
    }/*from   ww  w. j a v a2 s .  co  m*/
    if (o == null || getClass() != o.getClass()) {
        return false;
    }
    JsonApiVersionJsonapi jsonApiVersionJsonapi = (JsonApiVersionJsonapi) o;
    return Objects.equals(this.version, jsonApiVersionJsonapi.version);
}

From source file:com.autodesk.client.model.MeshObj.java

@Override
public boolean equals(java.lang.Object o) {
    if (this == o) {
        return true;
    }/*from  ww w.  ja  va2 s .co m*/
    if (o == null || getClass() != o.getClass()) {
        return false;
    }
    MeshObj meshObj = (MeshObj) o;
    return Objects.equals(this.id, meshObj.id) && Objects.equals(this.fileType, meshObj.fileType);
}

From source file:io.confluent.kafkarest.entities.TopicPartitionOffsetMetadata.java

@Override
public boolean equals(Object o) {
    if (this == o) {
        return true;
    }/* w  ww  .j a  va2s  .  c o m*/
    if (o == null || getClass() != o.getClass()) {
        return false;
    }

    TopicPartitionOffsetMetadata that = (TopicPartitionOffsetMetadata) o;

    if (offset != that.offset) {
        return false;
    }
    if (!Objects.equals(metadata, that.metadata)) {
        return false;
    }
    if (partition != that.partition) {
        return false;
    }
    if (topic != null ? !topic.equals(that.topic) : that.topic != null) {
        return false;
    }

    return true;
}

From source file:fi.otavanopisto.restfulptv.client.model.NotImplemented.java

@Override
public boolean equals(java.lang.Object o) {
    if (this == o) {
        return true;
    }//ww  w.  ja  v  a  2  s  . com
    if (o == null || getClass() != o.getClass()) {
        return false;
    }
    NotImplemented notImplemented = (NotImplemented) o;
    return Objects.equals(this.code, notImplemented.code)
            && Objects.equals(this.message, notImplemented.message);
}

From source file:th.co.geniustree.dental.model.OrderHeal.java

@Override
public boolean equals(Object obj) {
    if (obj == null) {
        return false;
    }//from w  ww.  j a v  a 2 s.co m
    if (getClass() != obj.getClass()) {
        return false;
    }
    final OrderHeal other = (OrderHeal) obj;
    if (!Objects.equals(this.id, other.id)) {
        return false;
    }
    return true;
}

From source file:org.obiba.mica.micaConfig.domain.OpalCredential.java

@Override
public boolean equals(Object obj) {
    if (this == obj)
        return true;

    if (obj == null || getClass() != obj.getClass())
        return false;

    return Objects.equals(getId(), ((OpalCredential) obj).getId())
            && getVersion() == ((OpalCredential) obj).getVersion()
            && authType.equals(((OpalCredential) obj).getAuthType())
            && ((username == null && ((OpalCredential) obj).getUsername() == null)
                    || username.equals(((OpalCredential) obj).getUsername()))
            && ((password == null && ((OpalCredential) obj).getPassword() == null)
                    || password.equals(((OpalCredential) obj).getPassword()));
}

From source file:com.vsct.dt.hesperides.storage.Event.java

@Override
public boolean equals(Object obj) {
    if (this == obj) {
        return true;
    }/*from   ww w.j av  a2 s. co m*/
    if (obj == null || getClass() != obj.getClass()) {
        return false;
    }
    final Event other = (Event) obj;
    return Objects.equals(this.eventType, other.eventType) && Objects.equals(this.data, other.data)
            && Objects.equals(this.timestamp, other.timestamp) && Objects.equals(this.user, other.user);
}

From source file:th.co.geniustree.dental.model.OrderBill.java

@Override
public boolean equals(Object obj) {
    if (obj == null) {
        return false;
    }//from www .j  a  v  a2 s  .  c o m
    if (getClass() != obj.getClass()) {
        return false;
    }
    final OrderBill other = (OrderBill) obj;
    if (!Objects.equals(this.id, other.id)) {
        return false;
    }
    return true;
}