|
5 | 5 |
|
6 | 6 | public enum LogicSpecies implements IStringSerializable {
|
7 | 7 | // Enum
|
8 |
| - AND(I18n.format("enum.pmtinfai.and")), OR(I18n.format("enum.pmtinfai.or")), NOT(I18n.format("enum.pmtinfai.not")), NOR(I18n.format("enum.pmtinfai.nor")), NAND(I18n.format("enum.pmtinfai.nand")), XOR(I18n.format("enum.pmtinfai.xor")), XNOR(I18n.format("enum.pmtinfai.xnor")), NONE(I18n.format("enum.pmtinfai.none")), CUSTOM(I18n.format("enum.pmtinfai.custom")); |
| 8 | + AND("and"), OR("or"), NOT("not"), NOR("nor"), NAND("nand"), XOR("xor"), XNOR("xnor"), NONE("none"), CUSTOM("custom"); |
9 | 9 | private static final String[] help = new String[]{"(A&(B&C)),(A&B),F", "(A|(B|C)),(A|B),F", "F,F,(!A)", "(!(A|(B|C))),(!(A|B)),F",
|
10 | 10 | "(!(A&(B&C))),(!(A&B)),F", "((A&(B&C))|((A&((!B)&(!C)))|(((!A)&(B&(!C)))|((!A)&((!B)&C))))),(((!A)&B)|((!B)&A)),F",
|
11 | 11 | "(!((A&(B&C))|((A&((!B)&(!C)))|(((!A)&(B&(!C)))|((!A)&((!B)&C)))))),(!(((!A)&B)|((!B)&A))),F"};
|
@@ -42,6 +42,38 @@ public String getName() {
|
42 | 42 | *
|
43 | 43 | * @return Aktiv wenn die InputSeite existiert
|
44 | 44 | */
|
| 45 | + |
| 46 | + public String getTranslationName() { |
| 47 | + if(this==AND){ |
| 48 | + return I18n.format("enum.pmtinfai.and"); |
| 49 | + } |
| 50 | + if(this==OR){ |
| 51 | + return I18n.format("enum.pmtinfai.or"); |
| 52 | + } |
| 53 | + if(this==NOT){ |
| 54 | + return I18n.format("enum.pmtinfai.not"); |
| 55 | + } |
| 56 | + if(this==NOR){ |
| 57 | + return I18n.format("enum.pmtinfai.nor"); |
| 58 | + } |
| 59 | + if(this==NAND){ |
| 60 | + return I18n.format("enum.pmtinfai.nand"); |
| 61 | + } |
| 62 | + if(this==XOR){ |
| 63 | + return I18n.format("enum.pmtinfai.xor"); |
| 64 | + } |
| 65 | + if(this==XNOR){ |
| 66 | + return I18n.format("enum.pmtinfai.xnor"); |
| 67 | + } |
| 68 | + if(this==NONE){ |
| 69 | + return I18n.format("enum.pmtinfai.none"); |
| 70 | + } |
| 71 | + if(this==CUSTOM){ |
| 72 | + return I18n.format("enum.pmtinfai.custom"); |
| 73 | + } |
| 74 | + return this.getName(); |
| 75 | + } |
| 76 | + |
45 | 77 | public boolean isActive() {
|
46 | 78 | return this != NONE;
|
47 | 79 | }
|
|
0 commit comments