Initial data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 72d218235f
commit f23f22d71c
199087 changed files with 3378941 additions and 0 deletions

View file

@ -0,0 +1,41 @@
public class If2 {
private final boolean firstCondition;
private final boolean secondCondition;
public If2(boolean firstCondition, boolean secondCondition) {
this.firstCondition = firstCondition;
this.secondCondition = secondCondition;
}
public static If2 if2(boolean firstCondition, boolean secondCondition) {
return new If2(firstCondition, secondCondition);
}
public If2 then(Runnable runnable) {
if (firstCondition && secondCondition) {
runnable.run();
}
return this;
}
public If2 elseNone(Runnable runnable) {
if (!firstCondition && !secondCondition) {
runnable.run();
}
return this;
}
public If2 elseIfFirst(Runnable runnable) {
if (firstCondition && !secondCondition) {
runnable.run();
}
return this;
}
public If2 elseIfSecond(Runnable runnable) {
if (!firstCondition && secondCondition) {
runnable.run();
}
return this;
}
}