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.jivesoftware.os.upena.shared.User.java

@Override
public boolean equals(Object obj) {
    if (obj == null) {
        return false;
    }//www  .ja va 2s  . c  o  m
    if (getClass() != obj.getClass()) {
        return false;
    }
    final User other = (User) obj;
    if (!Objects.equals(this.name, other.name)) {
        return false;
    }
    return true;
}

From source file:com.vsct.dt.hesperides.templating.platform.ApplicationData.java

@Override
public boolean equals(Object obj) {
    if (this == obj) {
        return true;
    }/*from  w w w.j  a  v  a 2 s  . c  om*/
    if (obj == null || getClass() != obj.getClass()) {
        return false;
    }
    final ApplicationData other = (ApplicationData) obj;
    return Objects.equals(this.name, other.name) && Objects.equals(this.platforms, other.platforms);
}

From source file:org.hawkular.component.pinger.MetricDataMessage.java

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

From source file:org.hawkular.client.metrics.model.GaugeDataPoint.java

@Override
public boolean equals(Object o) {
    if (this == o)
        return true;
    if (o == null || getClass() != o.getClass())
        return false;
    GaugeDataPoint that = (GaugeDataPoint) o;
    // TODO should tags be included in equals?
    return Objects.equals(timestamp, that.timestamp) && Objects.equals(value, that.value);
}

From source file:br.com.ezequieljuliano.argos.domain.Marker.java

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

From source file:org.hawkular.client.metrics.model.CounterDataPoint.java

@Override
public boolean equals(Object o) {
    if (this == o)
        return true;
    if (o == null || getClass() != o.getClass())
        return false;
    CounterDataPoint that = (CounterDataPoint) o;
    // TODO should tags be included in equals?
    return Objects.equals(timestamp, that.timestamp) && Objects.equals(value, that.value);
}

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

@Override
public boolean equals(java.lang.Object o) {
    if (this == o) {
        return true;
    }/*from   www  . ja v a 2s. c om*/
    if (o == null || getClass() != o.getClass()) {
        return false;
    }
    Formats formats = (Formats) o;
    return Objects.equals(this.formats, formats.formats);
}

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

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

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

@Override
public boolean equals(java.lang.Object o) {
    if (this == o) {
        return true;
    }/*from  ww  w  .  jav a2 s  . c  o  m*/
    if (o == null || getClass() != o.getClass()) {
        return false;
    }
    Friend friend = (Friend) o;
    return Objects.equals(this.id, friend.id) && Objects.equals(this.from, friend.from)
            && Objects.equals(this.to, friend.to);
}

From source file:com.intel.podm.allocation.strategy.matcher.LocalStorageMatcher.java

private boolean areMatched(List<RequestedLocalDrive> requestedDrives,
        List<LocalStorage> availableLocalStorage) {
    LocalStorageAllocationMapper mapper = new LocalStorageAllocationMapper();
    Map<RequestedLocalDrive, LocalStorage> mapped = mapper.map(requestedDrives, availableLocalStorage);
    return Objects.equals(requestedDrives.size(), mapped.size());
}