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:th.co.geniustree.dental.model.ListSelectHeal.java

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

From source file:com.thinkbiganalytics.metadata.api.event.feed.FeedChange.java

@Override
public boolean equals(Object obj) {
    if (obj instanceof FeedChange) {
        FeedChange that = (FeedChange) obj;
        return super.equals(that) && Objects.equals(this.feedId, that.feedId)
                && Objects.equals(this.feedState, that.feedState);
    } else {/* w  w w  .j a  va2  s  . com*/
        return false;
    }
}

From source file:ws.salient.model.Repository.java

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

From source file:com.haulmont.cuba.web.jmx.JmxConnectionHelper.java

protected static Collection<ObjectName> getSuitableObjectNames(final MBeanServerConnection connection,
        final Class objectClass) throws IOException {
    Set<ObjectName> names = connection.queryNames(null, null);

    // find all suitable beans
    @SuppressWarnings("unchecked")
    Collection<ObjectName> suitableNames = CollectionUtils.select(names, o -> {
        MBeanInfo info;/*from w ww  . j  av a 2  s.  c o  m*/
        try {
            info = connection.getMBeanInfo(o);
        } catch (Exception e) {
            throw new JmxControlException(e);
        }
        return Objects.equals(objectClass.getName(), info.getClassName());
    });

    return suitableNames;
}

From source file:io.github.carlomicieli.footballdb.starter.mapping.Height.java

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

    Height that = (Height) obj;/*from   w  w  w  . j  a va  2s  .  c om*/
    return Objects.equals(this.feet, that.feet) && Objects.equals(this.inches, that.inches);
}

From source file:no.kantega.publishing.jobs.xmlimport.XMLImportJob.java

public void importXml() {
    if (Objects.equals(serverType, disableForServerType)) {
        log.info("{} Import {} disabled for server type {}", id, url, disableForServerType);
        return;/*from   w  ww .ja v  a2 s.co m*/
    }

    log.info("XMLImport started:" + id + ", url:" + url);

    try (CloseableHttpResponse execute = httpClientBuilder.build().execute(new HttpGet(url))) {
        Document xml = XMLHelper.openDocument(execute.getEntity().getContent());

        if (isValidXML(xml)) {
            XMLCacheEntry cacheEntry = new XMLCacheEntry(id, xml);
            xmlCache.storeXMLInCache(cacheEntry);
        }

    } catch (SystemException | IOException e) {
        log.error("", e);
    }
    log.info("XMLImport ended:" + id);
}

From source file:io.gravitee.management.model.ApiKeyEntity.java

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

From source file:com.okta.sdk.models.log.LogSecurityContext.java

@Override
public boolean equals(Object obj) {
    if (this == obj) {
        return true;
    }/*from  w  w w.ja  v  a  2 s.c  o m*/
    if (obj == null || !(obj instanceof LogSecurityContext)) {
        return false;
    }
    final LogSecurityContext other = (LogSecurityContext) obj;
    return Objects.equals(this.asNumber, other.asNumber) && Objects.equals(this.asOrg, other.asOrg)
            && Objects.equals(this.isp, other.isp) && Objects.equals(this.domain, other.domain)
            && Objects.equals(this.isProxy, other.isProxy);
}

From source file:acmi.l2.clientmod.l2smr.model.L2Map.java

@Override
public boolean equals(Object o) {
    if (this == o)
        return true;
    if (o == null || getClass() != o.getClass())
        return false;
    L2Map map = (L2Map) o;
    return Float.compare(map.x, x) == 0 && Float.compare(map.y, y) == 0 && Float.compare(map.z, z) == 0
            && Objects.equals(staticMeshes, map.staticMeshes);
}

From source file:com.devicehive.model.rpc.NotificationSubscribeRequest.java

@Override
public boolean equals(Object o) {
    if (this == o)
        return true;
    if (!(o instanceof NotificationSubscribeRequest))
        return false;
    if (!super.equals(o))
        return false;
    NotificationSubscribeRequest that = (NotificationSubscribeRequest) o;
    return Objects.equals(subscriptionId, that.subscriptionId) && Objects.equals(device, that.device)
            && Objects.equals(names, that.names) && Objects.equals(timestamp, that.timestamp);
}