From 06279ed8bca4b952263926db3fda2142f7d8fe75 Mon Sep 17 00:00:00 2001 From: Matthew Morley Date: Fri, 28 Jul 2023 14:21:16 -0700 Subject: [PATCH] spotless --- .../photonvision/targeting/PNPResults.java | 26 ++++++------------ .../targeting/PhotonPipelineResult.java | 27 +++++++------------ 2 files changed, 17 insertions(+), 36 deletions(-) diff --git a/photon-targeting/src/main/java/org/photonvision/targeting/PNPResults.java b/photon-targeting/src/main/java/org/photonvision/targeting/PNPResults.java index df430936f6..c26ad39ca8 100644 --- a/photon-targeting/src/main/java/org/photonvision/targeting/PNPResults.java +++ b/photon-targeting/src/main/java/org/photonvision/targeting/PNPResults.java @@ -131,33 +131,23 @@ public int hashCode() { @Override public boolean equals(Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; + if (this == obj) return true; + if (obj == null) return false; + if (getClass() != obj.getClass()) return false; PNPResults other = (PNPResults) obj; - if (isPresent != other.isPresent) - return false; + if (isPresent != other.isPresent) return false; if (best == null) { - if (other.best != null) - return false; - } else if (!best.equals(other.best)) - return false; + if (other.best != null) return false; + } else if (!best.equals(other.best)) return false; if (Double.doubleToLongBits(bestReprojErr) != Double.doubleToLongBits(other.bestReprojErr)) return false; if (alt == null) { - if (other.alt != null) - return false; - } else if (!alt.equals(other.alt)) - return false; + if (other.alt != null) return false; + } else if (!alt.equals(other.alt)) return false; if (Double.doubleToLongBits(altReprojErr) != Double.doubleToLongBits(other.altReprojErr)) return false; if (Double.doubleToLongBits(ambiguity) != Double.doubleToLongBits(other.ambiguity)) return false; return true; } - - } diff --git a/photon-targeting/src/main/java/org/photonvision/targeting/PhotonPipelineResult.java b/photon-targeting/src/main/java/org/photonvision/targeting/PhotonPipelineResult.java index a78e297639..36256e2602 100644 --- a/photon-targeting/src/main/java/org/photonvision/targeting/PhotonPipelineResult.java +++ b/photon-targeting/src/main/java/org/photonvision/targeting/PhotonPipelineResult.java @@ -209,29 +209,20 @@ public int hashCode() { @Override public boolean equals(Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; + if (this == obj) return true; + if (obj == null) return false; + if (getClass() != obj.getClass()) return false; PhotonPipelineResult other = (PhotonPipelineResult) obj; if (targets == null) { - if (other.targets != null) - return false; - } else if (!targets.equals(other.targets)) - return false; + if (other.targets != null) return false; + } else if (!targets.equals(other.targets)) return false; if (Double.doubleToLongBits(latencyMillis) != Double.doubleToLongBits(other.latencyMillis)) return false; - if (Double.doubleToLongBits(timestampSeconds) != Double.doubleToLongBits(other.timestampSeconds)) - return false; + if (Double.doubleToLongBits(timestampSeconds) + != Double.doubleToLongBits(other.timestampSeconds)) return false; if (multiTagResult == null) { - if (other.multiTagResult != null) - return false; - } else if (!multiTagResult.equals(other.multiTagResult)) - return false; + if (other.multiTagResult != null) return false; + } else if (!multiTagResult.equals(other.multiTagResult)) return false; return true; } - - }