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.intel.podm.allocation.strategy.matcher.EthernetInterfaceMatcher.java

private boolean canMapRequestedWithAvailableInterfaces(List<RequestedEthernetInterface> requestedInterfaces,
        List<EthernetInterface> availableInterfaces) {
    Map<EthernetInterface, RequestedEthernetInterface> map = ethernetInterfacesAllocationMapper
            .map(availableInterfaces, requestedInterfaces);

    return Objects.equals(map.size(), requestedInterfaces.size());
}

From source file:org.appcomponents.platform.component.AppComponent.java

@Override
public boolean equals(Object o) {
    if (this == o) {
        return true;
    }/*ww  w  .j a  v a  2s  .c  om*/
    if (o == null || getClass() != o.getClass()) {
        return false;
    }
    AppComponent that = (AppComponent) o;
    return Objects.equals(this.componentName, that.componentName);
}

From source file:pa036.sprava_uziv_profilov.nosql.entities.Restaurant.java

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

From source file:com.connio.sdk.resource.property.Measurement.java

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

    Measurement that = (Measurement) o;/*ww  w  .j  av a  2s .  co  m*/
    return Objects.equals(type, that.type) && Objects.equals(unit, that.unit);
}

From source file:xyz.cloudbans.entities.request.ServerPlayerLeaveRequest.java

@Override
public boolean equals(Object o) {
    if (this == o)
        return true;
    if (!(o instanceof ServerPlayerLeaveRequest))
        return false;
    ServerPlayerLeaveRequest that = (ServerPlayerLeaveRequest) o;
    return Objects.equals(getServer(), that.getServer()) && Objects.equals(getPlayer(), that.getPlayer())
            && Objects.equals(getLeft(), that.getLeft());
}

From source file:edu.emory.cci.aiw.i2b2etl.dest.metadata.conceptid.ModifierParentConceptId.java

@Override
public boolean equals(Object obj) {
    if (obj == null) {
        return false;
    }/*from  ww  w.java2  s  . com*/
    if (getClass() != obj.getClass()) {
        return false;
    }
    final ModifierParentConceptId other = (ModifierParentConceptId) obj;
    if (!Objects.equals(this.id, other.id)) {
        return false;
    }
    return true;
}

From source file:com.livhuwani.rambuda.policyquotationapp.services.Impl.IntermediaryCrudServiceImpl.java

@Override
public void deleteIntermediary(Long id) {
    List<Intermediary> validUser = new ArrayList<Intermediary>();
    List<Intermediary> allUsers = intermediaryRepository.findAll();

    for (Intermediary user : allUsers) {
        if (Objects.equals(user.getId(), id)) {
            validUser.add(user);//w  ww .j a  va2s  . c o m
        }
    }
    intermediaryRepository.deleteInBatch(validUser);
}

From source file:com.pamarin.income.model.SelectionModel.java

@Override
public boolean equals(Object obj) {
    if (obj == null) {
        return false;
    }//from  ww  w  .j a v a2s  . co  m
    if (getClass() != obj.getClass()) {
        return false;
    }
    final SelectionModel<?> other = (SelectionModel<?>) obj;
    if (!Objects.equals(this.data, other.data)) {
        return false;
    }
    return true;
}

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

@Override
public boolean equals(java.lang.Object o) {
    if (this == o) {
        return true;
    }/*from  w ww .j  ava2s  .  c o  m*/
    if (o == null || getClass() != o.getClass()) {
        return false;
    }
    MeshProblems meshProblems = (MeshProblems) o;
    return Objects.equals(this.type, meshProblems.type);
}

From source file:edu.temple.cis3238.wiki.vo.TagsVO.java

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

    if (!Objects.equals(this.getTagName().toLowerCase().trim(), other.getTagName().toLowerCase())) {
        return false;
    }
    return true;
}