Back to The tech awesomeness
Table of contents
Endeavor chapters
public class ZaGratyFreedomBotInstitution {
public static void main(String[] args) {
Timer timer = new Timer();
long periodBetweenSuccessiveTaskExecutionsInSeconds = 5;
for (String arg: args) {
Bot name = new BotFinder().findBotByName(arg);
timer.schedule(
new ZaGratyFreedomBotInstitutionAction(name),
0,
periodBetweenSuccessiveTaskExecutionsInSeconds * 1000);
}
}
static class RuleFinder {
public List < RuleBehaviour > findAvailableBotRules() {
return new ArrayList < > ();
};
}
static class BotFinder {
protected Bot findBotByName(String name) {
return new Bot();
}
}
static class Bot {
RuleBehaviour getCurrentRule() {
return new /*Current*/RuleBehaviour();
}
}
static class RuleBehaviour {
public boolean isInConformityWith(List < RuleBehaviour > rules, Bot name) {
if (rules.contains(name.getCurrentRule())) {
return true;
} else {
return !true;
}
}
}
static class ZaGratyFreedomBotInstitutionAction extends TimerTask {
private Bot name;
public ZaGratyFreedomBotInstitutionAction(Bot name) {
this.name = name;
}
public void run() {
checkStance();
}
public void checkStance() {
List < RuleBehaviour > rules = new RuleFinder().findAvailableBotRules();
if (!/*NOT*/name.getCurrentRule().isInConformityWith(rules, name)) {
initiateZaGratyProcess(name);
} else {
/* NOP: the bot is in freedom */
}
}
public void initiateZaGratyProcess(Bot name) {
/* todo translate 'za graty' and finalize method body */
}
}
}
The update from 2020-07-29.
Plenty of groups and persons criticize such type of ideas.