Java Code Examples for java.util.Objects#deepEquals()

The following examples show how to use java.util.Objects#deepEquals() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: HomePosition.java    From mavlink with MIT License 6 votes vote down vote up
@Override
public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || !getClass().equals(o.getClass())) return false;
    HomePosition other = (HomePosition)o;
    if (!Objects.deepEquals(latitude, other.latitude)) return false;
    if (!Objects.deepEquals(longitude, other.longitude)) return false;
    if (!Objects.deepEquals(altitude, other.altitude)) return false;
    if (!Objects.deepEquals(x, other.x)) return false;
    if (!Objects.deepEquals(y, other.y)) return false;
    if (!Objects.deepEquals(z, other.z)) return false;
    if (!Objects.deepEquals(q, other.q)) return false;
    if (!Objects.deepEquals(approachX, other.approachX)) return false;
    if (!Objects.deepEquals(approachY, other.approachY)) return false;
    if (!Objects.deepEquals(approachZ, other.approachZ)) return false;
    if (!Objects.deepEquals(timeUsec, other.timeUsec)) return false;
    return true;
}
 
Example 2
Source File: UavcanNodeInfo.java    From mavlink with MIT License 6 votes vote down vote up
@Override
public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || !getClass().equals(o.getClass())) return false;
    UavcanNodeInfo other = (UavcanNodeInfo)o;
    if (!Objects.deepEquals(timeUsec, other.timeUsec)) return false;
    if (!Objects.deepEquals(uptimeSec, other.uptimeSec)) return false;
    if (!Objects.deepEquals(name, other.name)) return false;
    if (!Objects.deepEquals(hwVersionMajor, other.hwVersionMajor)) return false;
    if (!Objects.deepEquals(hwVersionMinor, other.hwVersionMinor)) return false;
    if (!Objects.deepEquals(hwUniqueId, other.hwUniqueId)) return false;
    if (!Objects.deepEquals(swVersionMajor, other.swVersionMajor)) return false;
    if (!Objects.deepEquals(swVersionMinor, other.swVersionMinor)) return false;
    if (!Objects.deepEquals(swVcsCommit, other.swVcsCommit)) return false;
    return true;
}
 
Example 3
Source File: HilGps.java    From mavlink with MIT License 6 votes vote down vote up
@Override
public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || !getClass().equals(o.getClass())) return false;
    HilGps other = (HilGps)o;
    if (!Objects.deepEquals(timeUsec, other.timeUsec)) return false;
    if (!Objects.deepEquals(fixType, other.fixType)) return false;
    if (!Objects.deepEquals(lat, other.lat)) return false;
    if (!Objects.deepEquals(lon, other.lon)) return false;
    if (!Objects.deepEquals(alt, other.alt)) return false;
    if (!Objects.deepEquals(eph, other.eph)) return false;
    if (!Objects.deepEquals(epv, other.epv)) return false;
    if (!Objects.deepEquals(vel, other.vel)) return false;
    if (!Objects.deepEquals(vn, other.vn)) return false;
    if (!Objects.deepEquals(ve, other.ve)) return false;
    if (!Objects.deepEquals(vd, other.vd)) return false;
    if (!Objects.deepEquals(cog, other.cog)) return false;
    if (!Objects.deepEquals(satellitesVisible, other.satellitesVisible)) return false;
    return true;
}
 
Example 4
Source File: SetPositionTargetLocalNed.java    From mavlink with MIT License 6 votes vote down vote up
@Override
public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || !getClass().equals(o.getClass())) return false;
    SetPositionTargetLocalNed other = (SetPositionTargetLocalNed)o;
    if (!Objects.deepEquals(timeBootMs, other.timeBootMs)) return false;
    if (!Objects.deepEquals(targetSystem, other.targetSystem)) return false;
    if (!Objects.deepEquals(targetComponent, other.targetComponent)) return false;
    if (!Objects.deepEquals(coordinateFrame, other.coordinateFrame)) return false;
    if (!Objects.deepEquals(typeMask, other.typeMask)) return false;
    if (!Objects.deepEquals(x, other.x)) return false;
    if (!Objects.deepEquals(y, other.y)) return false;
    if (!Objects.deepEquals(z, other.z)) return false;
    if (!Objects.deepEquals(vx, other.vx)) return false;
    if (!Objects.deepEquals(vy, other.vy)) return false;
    if (!Objects.deepEquals(vz, other.vz)) return false;
    if (!Objects.deepEquals(afx, other.afx)) return false;
    if (!Objects.deepEquals(afy, other.afy)) return false;
    if (!Objects.deepEquals(afz, other.afz)) return false;
    if (!Objects.deepEquals(yaw, other.yaw)) return false;
    if (!Objects.deepEquals(yawRate, other.yawRate)) return false;
    return true;
}
 
Example 5
Source File: RemoteLogBlockStatus.java    From mavlink with MIT License 5 votes vote down vote up
@Override
public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || !getClass().equals(o.getClass())) return false;
    RemoteLogBlockStatus other = (RemoteLogBlockStatus)o;
    if (!Objects.deepEquals(targetSystem, other.targetSystem)) return false;
    if (!Objects.deepEquals(targetComponent, other.targetComponent)) return false;
    if (!Objects.deepEquals(seqno, other.seqno)) return false;
    if (!Objects.deepEquals(status, other.status)) return false;
    return true;
}
 
Example 6
Source File: LocalPositionNed.java    From mavlink with MIT License 5 votes vote down vote up
@Override
public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || !getClass().equals(o.getClass())) return false;
    LocalPositionNed other = (LocalPositionNed)o;
    if (!Objects.deepEquals(timeBootMs, other.timeBootMs)) return false;
    if (!Objects.deepEquals(x, other.x)) return false;
    if (!Objects.deepEquals(y, other.y)) return false;
    if (!Objects.deepEquals(z, other.z)) return false;
    if (!Objects.deepEquals(vx, other.vx)) return false;
    if (!Objects.deepEquals(vy, other.vy)) return false;
    if (!Objects.deepEquals(vz, other.vz)) return false;
    return true;
}
 
Example 7
Source File: MissionRequestList.java    From mavlink with MIT License 5 votes vote down vote up
@Override
public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || !getClass().equals(o.getClass())) return false;
    MissionRequestList other = (MissionRequestList)o;
    if (!Objects.deepEquals(targetSystem, other.targetSystem)) return false;
    if (!Objects.deepEquals(targetComponent, other.targetComponent)) return false;
    if (!Objects.deepEquals(missionType, other.missionType)) return false;
    return true;
}
 
Example 8
Source File: AuthKey.java    From mavlink with MIT License 5 votes vote down vote up
@Override
public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || !getClass().equals(o.getClass())) return false;
    AuthKey other = (AuthKey)o;
    if (!Objects.deepEquals(key, other.key)) return false;
    return true;
}
 
Example 9
Source File: HighLatency.java    From mavlink with MIT License 5 votes vote down vote up
@Override
public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || !getClass().equals(o.getClass())) return false;
    HighLatency other = (HighLatency)o;
    if (!Objects.deepEquals(baseMode, other.baseMode)) return false;
    if (!Objects.deepEquals(customMode, other.customMode)) return false;
    if (!Objects.deepEquals(landedState, other.landedState)) return false;
    if (!Objects.deepEquals(roll, other.roll)) return false;
    if (!Objects.deepEquals(pitch, other.pitch)) return false;
    if (!Objects.deepEquals(heading, other.heading)) return false;
    if (!Objects.deepEquals(throttle, other.throttle)) return false;
    if (!Objects.deepEquals(headingSp, other.headingSp)) return false;
    if (!Objects.deepEquals(latitude, other.latitude)) return false;
    if (!Objects.deepEquals(longitude, other.longitude)) return false;
    if (!Objects.deepEquals(altitudeAmsl, other.altitudeAmsl)) return false;
    if (!Objects.deepEquals(altitudeSp, other.altitudeSp)) return false;
    if (!Objects.deepEquals(airspeed, other.airspeed)) return false;
    if (!Objects.deepEquals(airspeedSp, other.airspeedSp)) return false;
    if (!Objects.deepEquals(groundspeed, other.groundspeed)) return false;
    if (!Objects.deepEquals(climbRate, other.climbRate)) return false;
    if (!Objects.deepEquals(gpsNsat, other.gpsNsat)) return false;
    if (!Objects.deepEquals(gpsFixType, other.gpsFixType)) return false;
    if (!Objects.deepEquals(batteryRemaining, other.batteryRemaining)) return false;
    if (!Objects.deepEquals(temperature, other.temperature)) return false;
    if (!Objects.deepEquals(temperatureAir, other.temperatureAir)) return false;
    if (!Objects.deepEquals(failsafe, other.failsafe)) return false;
    if (!Objects.deepEquals(wpNum, other.wpNum)) return false;
    if (!Objects.deepEquals(wpDistance, other.wpDistance)) return false;
    return true;
}
 
Example 10
Source File: FenceFetchPoint.java    From mavlink with MIT License 5 votes vote down vote up
@Override
public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || !getClass().equals(o.getClass())) return false;
    FenceFetchPoint other = (FenceFetchPoint)o;
    if (!Objects.deepEquals(targetSystem, other.targetSystem)) return false;
    if (!Objects.deepEquals(targetComponent, other.targetComponent)) return false;
    if (!Objects.deepEquals(idx, other.idx)) return false;
    return true;
}
 
Example 11
Source File: Ahrs.java    From mavlink with MIT License 5 votes vote down vote up
@Override
public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || !getClass().equals(o.getClass())) return false;
    Ahrs other = (Ahrs)o;
    if (!Objects.deepEquals(omegaix, other.omegaix)) return false;
    if (!Objects.deepEquals(omegaiy, other.omegaiy)) return false;
    if (!Objects.deepEquals(omegaiz, other.omegaiz)) return false;
    if (!Objects.deepEquals(accelWeight, other.accelWeight)) return false;
    if (!Objects.deepEquals(renormVal, other.renormVal)) return false;
    if (!Objects.deepEquals(errorRp, other.errorRp)) return false;
    if (!Objects.deepEquals(errorYaw, other.errorYaw)) return false;
    return true;
}
 
Example 12
Source File: SerialUdbExtraF16.java    From mavlink with MIT License 5 votes vote down vote up
@Override
public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || !getClass().equals(o.getClass())) return false;
    SerialUdbExtraF16 other = (SerialUdbExtraF16)o;
    if (!Objects.deepEquals(sueIdLeadPilot, other.sueIdLeadPilot)) return false;
    if (!Objects.deepEquals(sueIdDiyDronesUrl, other.sueIdDiyDronesUrl)) return false;
    return true;
}
 
Example 13
Source File: GoproGetRequest.java    From mavlink with MIT License 5 votes vote down vote up
@Override
public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || !getClass().equals(o.getClass())) return false;
    GoproGetRequest other = (GoproGetRequest)o;
    if (!Objects.deepEquals(targetSystem, other.targetSystem)) return false;
    if (!Objects.deepEquals(targetComponent, other.targetComponent)) return false;
    if (!Objects.deepEquals(cmdId, other.cmdId)) return false;
    return true;
}
 
Example 14
Source File: TestBase64Golden.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
private static void assertEqual(Object result, Object expect) {
    if (!Objects.deepEquals(result, expect)) {
        String resultStr = result.toString();
        String expectStr = expect.toString();
        if (result instanceof byte[]) {
            resultStr = new String((byte[]) result, DEF_CHARSET);
        }
        if (expect instanceof byte[]) {
            expectStr = new String((byte[]) expect, DEF_CHARSET);
        }
        throw new RuntimeException(DEF_EXCEPTION_MSG +
            " result: " + resultStr + " expected: " + expectStr);
    }
}
 
Example 15
Source File: LogEntry.java    From mavlink with MIT License 5 votes vote down vote up
@Override
public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || !getClass().equals(o.getClass())) return false;
    LogEntry other = (LogEntry)o;
    if (!Objects.deepEquals(id, other.id)) return false;
    if (!Objects.deepEquals(numLogs, other.numLogs)) return false;
    if (!Objects.deepEquals(lastLogNum, other.lastLogNum)) return false;
    if (!Objects.deepEquals(timeUtc, other.timeUtc)) return false;
    if (!Objects.deepEquals(size, other.size)) return false;
    return true;
}
 
Example 16
Source File: Rangefinder.java    From mavlink with MIT License 5 votes vote down vote up
@Override
public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || !getClass().equals(o.getClass())) return false;
    Rangefinder other = (Rangefinder)o;
    if (!Objects.deepEquals(distance, other.distance)) return false;
    if (!Objects.deepEquals(voltage, other.voltage)) return false;
    return true;
}
 
Example 17
Source File: FailsafeFeatureRow.java    From feast with Apache License 2.0 5 votes vote down vote up
@Override
public boolean equals(Object obj) {
  if (this == obj) {
    return true;
  }
  if (obj == null || getClass() != obj.getClass()) {
    return false;
  }

  final FailsafeFeatureRow other = (FailsafeFeatureRow) obj;
  return Objects.deepEquals(this.originalPayload, other.getOriginalPayload())
      && Objects.deepEquals(this.payload, other.getPayload())
      && Objects.deepEquals(this.errorMessage, other.getErrorMessage())
      && Objects.deepEquals(this.stacktrace, other.getStacktrace());
}
 
Example 18
Source File: RocksDBKVStore.java    From journalkeeper with Apache License 2.0 5 votes vote down vote up
@Override
public boolean compareAndSet(byte[] key, byte[] expect, byte[] update) {
    try {
        byte[] current = rocksDB.get(key);
        if (current != null && !Objects.deepEquals(current, expect)) {
            return false;
        }
        rocksDB.put(key, update);
        return true;
    } catch (RocksDBException e) {
        throw new CoordinatingStateException(e);
    }
}
 
Example 19
Source File: WrappedCompoundFormats.java    From dremio-oss with Apache License 2.0 4 votes vote down vote up
@Override
public boolean equals(Object obj) {
  return Objects.deepEquals(this, obj);
}
 
Example 20
Source File: LoggerBridgeTest.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
@Override
public boolean equals(Object obj) {
    return obj instanceof LogEvent
            && Objects.deepEquals(this.toArray(), ((LogEvent)obj).toArray());
}