From b09b54435f9427332854558c42bd2c902825cbfe Mon Sep 17 00:00:00 2001 From: Dream-Master Date: Tue, 21 Jun 2016 18:42:02 +0200 Subject: remove all --- .../java/gregtech/api/interfaces/ICondition.java | 104 --------------------- 1 file changed, 104 deletions(-) delete mode 100644 src/main/java/gregtech/api/interfaces/ICondition.java (limited to 'src/main/java/gregtech/api/interfaces/ICondition.java') diff --git a/src/main/java/gregtech/api/interfaces/ICondition.java b/src/main/java/gregtech/api/interfaces/ICondition.java deleted file mode 100644 index 9e31da7338..0000000000 --- a/src/main/java/gregtech/api/interfaces/ICondition.java +++ /dev/null @@ -1,104 +0,0 @@ -package gregtech.api.interfaces; - -public interface ICondition { - public boolean isTrue(O aObject); - - // Utility Classes for adding relations between Conditions. - - public static class Not implements ICondition { - private final ICondition mCondition; - - public Not(ICondition aCondition) { - mCondition = aCondition; - } - - @Override - public boolean isTrue(O aObject) { - return !mCondition.isTrue(aObject); - } - } - - public static class Or implements ICondition { - private final ICondition[] mConditions; - - public Or(ICondition... aConditions) { - mConditions = aConditions; - } - - @Override - public boolean isTrue(O aObject) { - for (ICondition tCondition : mConditions) if (tCondition.isTrue(aObject)) return true; - return false; - } - } - - public static class Nor implements ICondition { - private final ICondition[] mConditions; - - public Nor(ICondition... aConditions) { - mConditions = aConditions; - } - - @Override - public boolean isTrue(O aObject) { - for (ICondition tCondition : mConditions) if (tCondition.isTrue(aObject)) return false; - return true; - } - } - - public static class And implements ICondition { - private final ICondition[] mConditions; - - public And(ICondition... aConditions) { - mConditions = aConditions; - } - - @Override - public boolean isTrue(O aObject) { - for (ICondition tCondition : mConditions) if (!tCondition.isTrue(aObject)) return false; - return true; - } - } - - public static class Nand implements ICondition { - private final ICondition[] mConditions; - - public Nand(ICondition... aConditions) { - mConditions = aConditions; - } - - @Override - public boolean isTrue(O aObject) { - for (ICondition tCondition : mConditions) if (!tCondition.isTrue(aObject)) return true; - return false; - } - } - - public static class Xor implements ICondition { - private final ICondition mCondition1, mCondition2; - - public Xor(ICondition aCondition1, ICondition aCondition2) { - mCondition1 = aCondition1; - mCondition2 = aCondition2; - } - - @Override - public boolean isTrue(O aObject) { - return mCondition1.isTrue(aObject) != mCondition2.isTrue(aObject); - } - } - - public static class Equal implements ICondition { - private final ICondition mCondition1, mCondition2; - - public Equal(ICondition aCondition1, ICondition aCondition2) { - mCondition1 = aCondition1; - mCondition2 = aCondition2; - } - - @Override - public boolean isTrue(O aObject) { - return mCondition1.isTrue(aObject) == mCondition2.isTrue(aObject); - } - } -} \ No newline at end of file -- cgit