Add spy-everything

This commit is contained in:
Draycia committed 2020-08-31 04:05:05 -07:00
1 parent d9ab3b3bdd
commit e95d0eeae8
3 files changed
+71 -2

No files matched your search

@@ -0,0 +1,31 @@
package net.draycia.carbon.util;
import org.jetbrains.annotations.Nullable;
public class ThisOrThat<A, B> {
@Nullable A objectA;
@Nullable B objectB;
public ThisOrThat(@Nullable A objectA, @Nullable B objectB) {
this.objectA = objectA;
this.objectB = objectB;
}
public boolean isThis() {
return objectA != null;
}
public boolean isThat() {
return objectB != null;
}
public @Nullable A getThis() {
return objectA;
}
public @Nullable B getThat() {
return objectB;
}
}