mirror of
https://github.com/PhotonVision/photonvision
synced 2026-07-06 03:31:41 +00:00
add FrameProviders, meddle with 2.x code
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
package com.chameleonvision.common.util.numbers;
|
||||
|
||||
public class NumberCouple<T extends Number> {
|
||||
public abstract class NumberCouple<T extends Number> {
|
||||
|
||||
private T first;
|
||||
private T second;
|
||||
@@ -30,4 +30,26 @@ public class NumberCouple<T extends Number> {
|
||||
this.first = first;
|
||||
this.second = second;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (!(obj instanceof NumberCouple)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var couple = (NumberCouple) obj;
|
||||
if (!couple.first.equals(first)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!couple.second.equals(second)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean isEmpty() {
|
||||
return first.intValue() == 0 && second.intValue() == 0;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user