mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +00:00
Use Java 17 features (#6691)
Uses enhanced instanceof (and simplify equals methods) Uses switch expressions and arrow labels Seal and finalize some Shuffleboard classes Co-authored-by: Sam Carlberg <sam@slfc.dev>
This commit is contained in:
@@ -74,11 +74,9 @@ public class Pair<A, B> {
|
||||
if (obj == this) {
|
||||
return true;
|
||||
}
|
||||
if (obj instanceof Pair) {
|
||||
return Objects.equals(m_first, ((Pair) obj).getFirst())
|
||||
&& Objects.equals(m_second, ((Pair) obj).getSecond());
|
||||
}
|
||||
return false;
|
||||
return obj instanceof Pair<?, ?> other
|
||||
&& Objects.equals(m_first, other.getFirst())
|
||||
&& Objects.equals(m_second, other.getSecond());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user