From ffbb0eb24842e51aa3b3a6965b0d176a76a01c4d Mon Sep 17 00:00:00 2001 From: Kyle Gunger Date: Mon, 18 Nov 2019 23:20:53 -0500 Subject: [Update] Change class path from corecg.transit to transit --- .../java/net/corecg/transit/impl/IAcceptor.java | 13 ------ .../java/net/corecg/transit/impl/IConsumer.java | 10 ---- .../java/net/corecg/transit/impl/IGenerator.java | 10 ---- .../java/net/corecg/transit/impl/IProvider.java | 17 ------- .../java/net/corecg/transit/type/IBaseType.java | 7 --- src/main/java/net/corecg/transit/type/IType.java | 10 ---- .../net/corecg/transit/type/typebase/MetaBase.java | 26 ----------- .../corecg/transit/type/typebase/NumberBase.java | 18 -------- .../corecg/transit/type/typebase/StringBase.java | 18 -------- .../corecg/transit/type/typegroup/TypeGroup.java | 53 ---------------------- .../transit/type/typegroup/TypeRegister.java | 42 ----------------- 11 files changed, 224 deletions(-) delete mode 100644 src/main/java/net/corecg/transit/impl/IAcceptor.java delete mode 100644 src/main/java/net/corecg/transit/impl/IConsumer.java delete mode 100644 src/main/java/net/corecg/transit/impl/IGenerator.java delete mode 100644 src/main/java/net/corecg/transit/impl/IProvider.java delete mode 100644 src/main/java/net/corecg/transit/type/IBaseType.java delete mode 100644 src/main/java/net/corecg/transit/type/IType.java delete mode 100644 src/main/java/net/corecg/transit/type/typebase/MetaBase.java delete mode 100644 src/main/java/net/corecg/transit/type/typebase/NumberBase.java delete mode 100644 src/main/java/net/corecg/transit/type/typebase/StringBase.java delete mode 100644 src/main/java/net/corecg/transit/type/typegroup/TypeGroup.java delete mode 100644 src/main/java/net/corecg/transit/type/typegroup/TypeRegister.java (limited to 'src/main/java/net/corecg') diff --git a/src/main/java/net/corecg/transit/impl/IAcceptor.java b/src/main/java/net/corecg/transit/impl/IAcceptor.java deleted file mode 100644 index 2561a04..0000000 --- a/src/main/java/net/corecg/transit/impl/IAcceptor.java +++ /dev/null @@ -1,13 +0,0 @@ -package net.corecg.transit.impl; - -import net.corecg.transit.type.IType; -import net.minecraft.util.math.Direction; - -public interface IAcceptor> -{ - // Direction given if acceptor is a block - public boolean canAccept(Direction d); - - // Accept (or not) a provided T (should trigger ITransferEvent) - public boolean accept(T provided); -} \ No newline at end of file diff --git a/src/main/java/net/corecg/transit/impl/IConsumer.java b/src/main/java/net/corecg/transit/impl/IConsumer.java deleted file mode 100644 index cca2b5c..0000000 --- a/src/main/java/net/corecg/transit/impl/IConsumer.java +++ /dev/null @@ -1,10 +0,0 @@ -package net.corecg.transit.impl; - -import net.corecg.transit.type.IType; - -public interface IConsumer> extends IAcceptor -{ - public boolean canConsume(); - - -} \ No newline at end of file diff --git a/src/main/java/net/corecg/transit/impl/IGenerator.java b/src/main/java/net/corecg/transit/impl/IGenerator.java deleted file mode 100644 index e8aa791..0000000 --- a/src/main/java/net/corecg/transit/impl/IGenerator.java +++ /dev/null @@ -1,10 +0,0 @@ -package net.corecg.transit.impl; - -import net.corecg.transit.type.IType; - -public interface IGenerator> extends IProvider -{ - public boolean canGenerate(); - - -} \ No newline at end of file diff --git a/src/main/java/net/corecg/transit/impl/IProvider.java b/src/main/java/net/corecg/transit/impl/IProvider.java deleted file mode 100644 index 082ef07..0000000 --- a/src/main/java/net/corecg/transit/impl/IProvider.java +++ /dev/null @@ -1,17 +0,0 @@ -package net.corecg.transit.impl; - -import net.corecg.transit.type.IType; -import net.minecraft.util.math.Direction; - -public interface IProvider> -{ - - // Direction given if provider is a block - public boolean canProvide(Direction d); - - // Provide the next T (should trigger ITransferEvent) - public T provide(); - - // Retain the rejected T if the acceptor did not accept it (should trigger ITransferEvent) - public void accept(T rejected); -} \ No newline at end of file diff --git a/src/main/java/net/corecg/transit/type/IBaseType.java b/src/main/java/net/corecg/transit/type/IBaseType.java deleted file mode 100644 index 4cf5ada..0000000 --- a/src/main/java/net/corecg/transit/type/IBaseType.java +++ /dev/null @@ -1,7 +0,0 @@ -package net.corecg.transit.type; - -public interface IBaseType -{ - - public T getData(); -} \ No newline at end of file diff --git a/src/main/java/net/corecg/transit/type/IType.java b/src/main/java/net/corecg/transit/type/IType.java deleted file mode 100644 index c7b1854..0000000 --- a/src/main/java/net/corecg/transit/type/IType.java +++ /dev/null @@ -1,10 +0,0 @@ -package net.corecg.transit.type; - -public interface IType extends IBaseType -{ - public String getTypeName(); - - public IBaseType convertToBase(); - - public IType convertFromBase(IBaseType base); -} \ No newline at end of file diff --git a/src/main/java/net/corecg/transit/type/typebase/MetaBase.java b/src/main/java/net/corecg/transit/type/typebase/MetaBase.java deleted file mode 100644 index b890e54..0000000 --- a/src/main/java/net/corecg/transit/type/typebase/MetaBase.java +++ /dev/null @@ -1,26 +0,0 @@ -package net.corecg.transit.type.typebase; - -import net.corecg.transit.type.IBaseType; - -public class MetaBase> implements IBaseType -{ - private T data; - private String metaData; - - public MetaBase(T dat, String meta) - { - data = dat; - metaData = meta; - } - - public T getData() - { - return data; - } - - public String getMetaData() - { - return metaData; - } - -} \ No newline at end of file diff --git a/src/main/java/net/corecg/transit/type/typebase/NumberBase.java b/src/main/java/net/corecg/transit/type/typebase/NumberBase.java deleted file mode 100644 index 5f30cf2..0000000 --- a/src/main/java/net/corecg/transit/type/typebase/NumberBase.java +++ /dev/null @@ -1,18 +0,0 @@ -package net.corecg.transit.type.typebase; - -import net.corecg.transit.type.IBaseType; - -public class NumberBase implements IBaseType -{ - private Number data; - - public NumberBase(Number dat) - { - data = dat; - } - - public Number getData() - { - return data; - } -} \ No newline at end of file diff --git a/src/main/java/net/corecg/transit/type/typebase/StringBase.java b/src/main/java/net/corecg/transit/type/typebase/StringBase.java deleted file mode 100644 index 1e2e4b8..0000000 --- a/src/main/java/net/corecg/transit/type/typebase/StringBase.java +++ /dev/null @@ -1,18 +0,0 @@ -package net.corecg.transit.type.typebase; - -import net.corecg.transit.type.IBaseType; - -public class StringBase implements IBaseType -{ - private String data; - - public StringBase(String dat) - { - data = dat; - } - - public String getData() - { - return data; - } -} \ No newline at end of file diff --git a/src/main/java/net/corecg/transit/type/typegroup/TypeGroup.java b/src/main/java/net/corecg/transit/type/typegroup/TypeGroup.java deleted file mode 100644 index d5a8101..0000000 --- a/src/main/java/net/corecg/transit/type/typegroup/TypeGroup.java +++ /dev/null @@ -1,53 +0,0 @@ -package net.corecg.transit.type.typegroup; - -import java.util.ArrayList; - -import net.corecg.transit.type.IType; -import net.corecg.transit.type.IBaseType; - -public class TypeGroup -{ - private IBaseType baseType; - - private String groupName; - - private ArrayList> types; - - /**Create a new TypeGroup - * - * @param base The base type of the group. - * @param name The identifier of the group. Should be in all caps. - */ - public TypeGroup(IBaseType base, String name) - { - baseType = base; - types = new ArrayList>(0); - groupName = name; - } - - // Return the base type - public IBaseType getBaseType() - { - return baseType; - } - - // Returns if the type is supported by the group - public boolean hasType(IType t) - { - - for(IType gtype : types) - { - - if(t.getTypeName() == gtype.getTypeName()) return true; - } - - return false; - } - - // Group name/identifier - public String getGroupName() - { - - return groupName; - } -} \ No newline at end of file diff --git a/src/main/java/net/corecg/transit/type/typegroup/TypeRegister.java b/src/main/java/net/corecg/transit/type/typegroup/TypeRegister.java deleted file mode 100644 index 4791e5b..0000000 --- a/src/main/java/net/corecg/transit/type/typegroup/TypeRegister.java +++ /dev/null @@ -1,42 +0,0 @@ -package net.corecg.transit.type.typegroup; - -import java.util.ArrayList; - -import net.corecg.transit.type.IType; - -public final class TypeRegister -{ - private TypeRegister(){} - - // Hold all the groups - private static ArrayList> groups = new ArrayList>(0); - - // Add a group - public static void addTypeGroup(TypeGroup g) - { - if(getTypeGroup(g.getGroupName()) == null) return; - - groups.add(g); - } - - // Get a group by it's identifier - public static TypeGroup getTypeGroup(String name) - { - for(TypeGroup g : groups) - { - if(g.getGroupName().toUpperCase() == name.toUpperCase()) return g; - } - - return null; - } - - public static String groupOf(IType t) - { - for(TypeGroup g : groups) - { - if(g.hasType(t)) return g.getGroupName(); - } - - return null; - } -} \ No newline at end of file -- cgit v1.2.3