mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-02 22:16:22 +00:00
Add spy-everything
This commit is contained in:
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;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user