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.joyent.manta.client.multipart.ServerSideMultipartUpload.java

@Override
public boolean equals(final Object o) {
    if (this == o) {
        return true;
    }//w ww. j av  a2  s .c  o  m
    if (o == null || getClass() != o.getClass()) {
        return false;
    }
    if (!super.equals(o)) {
        return false;
    }

    ServerSideMultipartUpload that = (ServerSideMultipartUpload) o;

    return Objects.equals(partsDirectory, that.partsDirectory);
}

From source file:com.eyem.entity.Usuario.java

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

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

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

From source file:com.thinkbiganalytics.metadata.core.BaseId.java

@Override
public boolean equals(Object obj) {
    if (getClass().isAssignableFrom(obj.getClass())) {
        BaseId that = (BaseId) obj;/*from w  w  w  .  j a v  a  2s.c  om*/
        return Objects.equals(getUuid(), that.getUuid());
    } else {
        return false;
    }
}

From source file:com.tacticlogistics.crm.view.backing.MenuBacking.java

@PostConstruct
public void init() {
    if (model == null) {
        title = "Dashboard";
        model = new DefaultMenuModel();
        listMenu = getMenus();/*from   w  w w .  jav  a 2 s.  c om*/
        for (Menus menus : listMenu) {
            if (menus.getMenus() == null) {
                DefaultSubMenu submenu = new DefaultSubMenu();
                submenu.setLabel(menus.getNombre());
                submenu.setIcon(menus.getIcono());
                boolean isMenu = true;
                for (Menus children : listMenu) {
                    if ((children.getMenus() != null)
                            && (Objects.equals(children.getMenus().getId(), menus.getId()))) {
                        DefaultMenuItem menuItem = new DefaultMenuItem();
                        menuItem.setValue(children.getNombre());
                        menuItem.setIcon(children.getIcono());
                        List<String> params = new ArrayList<>();
                        params.add(children.getPagina());
                        menuItem.setParams(new HashMap<>());
                        menuItem.getParams().put("pagina", params);
                        menuItem.setAjax(true);
                        menuItem.setCommand("#{menuBacking.goPageAction}");
                        submenu.addElement(menuItem);
                        isMenu = false;
                    }
                }
                if (isMenu) {
                    DefaultMenuItem menuItem = new DefaultMenuItem();
                    menuItem.setValue(menus.getNombre());
                    menuItem.setIcon(menus.getIcono());
                    List<String> params = new ArrayList<>();
                    params.add(menus.getPagina());
                    menuItem.setParams(new HashMap<>());
                    menuItem.getParams().put("pagina", params);
                    menuItem.setAjax(true);
                    menuItem.setCommand("#{menuBacking.goPageAction}");
                    model.addElement(menuItem);
                } else {
                    model.addElement(submenu);
                }

            }
        }
    }
}

From source file:com.connio.sdk.resource.Context.java

@Override
public boolean equals(Object o) {
    if (this == o)
        return true;
    if (o == null || getClass() != o.getClass())
        return false;

    Context that = (Context) o;
    return Objects.equals(type, that.type) && Objects.equals(id, that.id);
}

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

@Override
public boolean equals(Object obj) {
    if (obj == null) {
        return false;
    }//from  w  w w  .  j av a  2  s.  c o  m
    if (getClass() != obj.getClass()) {
        return false;
    }
    final RouterChangeSet other = (RouterChangeSet) obj;
    if (!Objects.equals(this.routeTreeChangeSet, other.routeTreeChangeSet)) {
        return false;
    }
    return true;
}

From source file:info.glennengstrand.api.Participant.java

@Override
public boolean equals(java.lang.Object o) {
    if (this == o) {
        return true;
    }//from   ww  w . j  a  v a 2  s  .com
    if (o == null || getClass() != o.getClass()) {
        return false;
    }
    Participant participant = (Participant) o;
    return Objects.equals(this.id, participant.id) && Objects.equals(this.name, participant.name);
}

From source file:com.vsct.dt.hesperides.indexation.search.TemplateSearchResponse.java

@Override
public boolean equals(Object obj) {
    if (this == obj) {
        return true;
    }// w w  w. java2 s  .c o m
    if (obj == null || getClass() != obj.getClass()) {
        return false;
    }
    final TemplateSearchResponse other = (TemplateSearchResponse) obj;
    return Objects.equals(this.namespace, other.namespace) && Objects.equals(this.name, other.name);
}

From source file:xyz.cloudbans.entities.response.Response.java

@Override
public boolean equals(Object o) {
    if (this == o)
        return true;
    if (!(o instanceof Response))
        return false;
    Response<?> response = (Response<?>) o;
    return getStatus() == response.getStatus() && Objects.equals(getData(), response.getData())
            && Objects.equals(getMessage(), response.getMessage())
            && Objects.equals(getCode(), response.getCode());
}