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:io.github.thred.climatetray.sim.ClimateTrayServerSimController.java

protected ClimateTrayServerSimState getStateByGroup(String group) {
    return states.stream().filter(state -> Objects.equals(group, state.getGroup())).findFirst().orElse(null);
}

From source file:com.cloud.agent.api.element.ShutDownVpcVspCommand.java

@Override
public boolean equals(Object o) {
    if (this == o) {
        return true;
    }/*from   w w w.  j a v a2s.c om*/
    if (!(o instanceof ShutDownVpcVspCommand)) {
        return false;
    }
    if (!super.equals(o))
        return false;

    ShutDownVpcVspCommand that = (ShutDownVpcVspCommand) o;

    return super.equals(that) && Objects.equals(_domainUuid, that._domainUuid)
            && Objects.equals(_vpcUuid, that._vpcUuid)
            && Objects.equals(_domainTemplateName, that._domainTemplateName)
            && Objects.equals(_domainRouterUuids, that._domainRouterUuids);
}

From source file:com.devicehive.shim.api.Request.java

@Override
public boolean equals(Object o) {
    if (this == o)
        return true;
    if (!(o instanceof Request))
        return false;
    Request request = (Request) o;
    return singleReplyExpected == request.singleReplyExpected && Objects.equals(body, request.body)
            && Objects.equals(correlationId, request.correlationId)
            && Objects.equals(partitionKey, request.partitionKey) && Objects.equals(replyTo, request.replyTo);
}

From source file:com.ibm.watson.catalyst.jumpqa.questioner.TextTemplateQuestioner.java

@Override
public boolean equals(Object obj) {
    if (this == obj)
        return true;
    if (obj == null || getClass() != obj.getClass())
        return false;
    TextTemplateQuestioner other = (TextTemplateQuestioner) obj;
    if (!Objects.equals(other._question, this._question))
        return false;
    return true;//  w w w  . jav  a  2  s. co m
}

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

@Override
public boolean equals(java.lang.Object o) {
    if (this == o) {
        return true;
    }/* w w w  .  jav  a2 s . com*/
    if (o == null || getClass() != o.getClass()) {
        return false;
    }
    JsonApiRelationshipsLinksRefs jsonApiRelationshipsLinksRefs = (JsonApiRelationshipsLinksRefs) o;
    return Objects.equals(this.links, jsonApiRelationshipsLinksRefs.links);
}

From source file:com.anathema_roguelike.main.utilities.Utils.java

public static <T, E> Set<T> getKeysByValue(Map<T, E> map, E value) {
    return map.entrySet().stream().filter(entry -> Objects.equals(entry.getValue(), value))
            .map(Map.Entry::getKey).collect(Collectors.toSet());
}

From source file:io.gravitee.repository.mongodb.management.internal.model.ApplicationMongo.java

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

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

@Override
public boolean equals(java.lang.Object o) {
    if (this == o) {
        return true;
    }/*from  w ww. j a  v a 2 s .c o  m*/
    if (o == null || getClass() != o.getClass()) {
        return false;
    }
    PostBucketsSigned postBucketsSigned = (PostBucketsSigned) o;
    return Objects.equals(this.minutesExpiration, postBucketsSigned.minutesExpiration);
}

From source file:com.offbynull.voip.kademlia.model.KBucketChangeSet.java

@Override
public boolean equals(Object obj) {
    if (obj == null) {
        return false;
    }//from  w  w  w  .  ja v a2 s  .  c o  m
    if (getClass() != obj.getClass()) {
        return false;
    }
    final KBucketChangeSet other = (KBucketChangeSet) obj;
    if (!Objects.equals(this.bucketChangeSet, other.bucketChangeSet)) {
        return false;
    }
    if (!Objects.equals(this.cacheChangeSet, other.cacheChangeSet)) {
        return false;
    }
    return true;
}

From source file:am.ik.categolj2.api.file.FileHelper.java

void checkFileName(String fileName, String requestedFileName) {
    if (!Objects.equals(fileName, requestedFileName)) {
        throw new ResourceNotFoundException("File not found. (fileName=" + requestedFileName + ")");
    }//from  ww w . j  a  v a2s  . c  o  m
}