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.bitsofproof.dropwizard.supernode.jackson.TransactionDeserializer.java

@Override
public JsonDeserializer<?> createContextual(DeserializationContext ctxt, BeanProperty property)
        throws JsonMappingException {
    if (property != null) {
        JsonFormat.Value format = ctxt.getAnnotationIntrospector().findFormat((Annotated) property.getMember());
        if (format != null && Objects.equals(TransactionSerializer.BASE64_FORMAT, format.getPattern())) {
            return new Base64TransactionDeserializer();
        }/*  www.  j  a  v a 2s .co  m*/
    }

    return new HexTransactionDeserializer();
}

From source file:org.hyperledger.jackson.TransactionDeserializer.java

@Override
public JsonDeserializer<?> createContextual(DeserializationContext ctxt, BeanProperty property)
        throws JsonMappingException {
    if (property != null) {
        JsonFormat.Value format = ctxt.getAnnotationIntrospector().findFormat(property.getMember());
        if (format != null && Objects.equals(TransactionSerializer.BASE64_FORMAT, format.getPattern())) {
            return new Base64TransactionDeserializer(formatter);
        }/*  w  w  w. j a  v a2  s. c  om*/
    }

    return new HexTransactionDeserializer(formatter);
}

From source file:com.carlomicieli.jtrains.value.objects.Length.java

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

    Length that = (Length) obj;/*from w  w  w.j a v  a 2  s .  co m*/
    return Objects.equals(this.mm, that.mm) && Objects.equals(this.inches, that.inches);
}

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

@Override
public boolean equals(java.lang.Object o) {
    if (this == o) {
        return true;
    }//from   w  w w  .  ja  va 2  s . c o  m
    if (o == null || getClass() != o.getClass()) {
        return false;
    }
    Result result = (Result) o;
    return Objects.equals(this.result, result.result);
}

From source file:th.co.geniustree.intenship.advisor.model.CategoryGroupCourse.java

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

From source file:com.cloud.agent.api.guru.DeallocateVmVspCommand.java

@Override
public boolean equals(Object o) {
    if (this == o) {
        return true;
    }/*from  w  w  w . ja  v  a 2 s .co m*/

    if (!(o instanceof DeallocateVmVspCommand)) {
        return false;
    }

    DeallocateVmVspCommand that = (DeallocateVmVspCommand) o;

    return super.equals(that) && Objects.equals(_network, that._network) && Objects.equals(_nic, that._nic)
            && Objects.equals(_vm, that._vm);
}

From source file:com.cloud.agent.api.guru.UpdateDhcpOptionVspCommand.java

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

    if (!(o instanceof UpdateDhcpOptionVspCommand)) {
        return false;
    }

    UpdateDhcpOptionVspCommand that = (UpdateDhcpOptionVspCommand) o;

    return super.equals(that) && Objects.equals(_network, that._network)
            && Objects.equals(_dhcpOptions, that._dhcpOptions);
}

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

@Override
public boolean equals(java.lang.Object o) {
    if (this == o) {
        return true;
    }//from  w  w  w  .  j  a v  a2 s.  c  om
    if (o == null || getClass() != o.getClass()) {
        return false;
    }
    JsonApiLink jsonApiLink = (JsonApiLink) o;
    return Objects.equals(this.href, jsonApiLink.href);
}

From source file:com.vsct.dt.hesperides.indexation.model.PropertyIndexation.java

@Override
public boolean equals(Object obj) {
    if (this == obj) {
        return true;
    }//  w  ww.  j ava  2 s . c  o m
    if (obj == null || getClass() != obj.getClass()) {
        return false;
    }
    final PropertyIndexation other = (PropertyIndexation) obj;
    return Objects.equals(this.comment, other.comment) && Objects.equals(this.name, other.name);
}

From source file:io.sidecar.query.Query.java

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

    Query that = (Query) o;

    return Objects.equals(this.stream, that.stream) && Objects.equals(this.args, that.args);
}