summaryrefslogtreecommitdiff
path: root/src/main/java/net/cshift/transit/network/system
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/net/cshift/transit/network/system')
-rw-r--r--src/main/java/net/cshift/transit/network/system/Connection.java49
-rw-r--r--src/main/java/net/cshift/transit/network/system/INode.java53
-rw-r--r--src/main/java/net/cshift/transit/network/system/ISystem.java15
-rw-r--r--src/main/java/net/cshift/transit/network/system/swap/IAcceptorNode.java37
-rw-r--r--src/main/java/net/cshift/transit/network/system/swap/IProviderNode.java27
5 files changed, 0 insertions, 181 deletions
diff --git a/src/main/java/net/cshift/transit/network/system/Connection.java b/src/main/java/net/cshift/transit/network/system/Connection.java
deleted file mode 100644
index a111795..0000000
--- a/src/main/java/net/cshift/transit/network/system/Connection.java
+++ /dev/null
@@ -1,49 +0,0 @@
-package net.cshift.transit.network.system;
-
-public class Connection {
- INode node;
- short mask;
-
- public Connection(INode n)
- {
- node = n;
- mask = 0;
- }
-
- public Connection(INode n, short m)
- {
- node = n;
- mask = m;
- }
-
- public INode getNode()
- {
- return node;
- }
-
- public boolean isAccepting()
- {
- return (mask & 1) == 1;
- }
-
- public void setAccepting(boolean value)
- {
- if(isAccepting() && value == false)
- mask -= 1;
- else if(!isAccepting() && value == true)
- mask += 1;
- }
-
- public boolean isProviding()
- {
- return (mask & 2) == 2;
- }
-
- public void setProviding(boolean value)
- {
- if(isProviding() && value == false)
- mask -= 2;
- else if(!isProviding() && value == true)
- mask += 2;
- }
-}
diff --git a/src/main/java/net/cshift/transit/network/system/INode.java b/src/main/java/net/cshift/transit/network/system/INode.java
deleted file mode 100644
index 5c901a9..0000000
--- a/src/main/java/net/cshift/transit/network/system/INode.java
+++ /dev/null
@@ -1,53 +0,0 @@
-package net.cshift.transit.network.system;
-
-/**
- * @author Kyle Gunger
- * @apiNote A node inside or outside a system.
- */
-public interface INode
-{
-
- /**Returns true if the group given is used by the node
- *
- * @param groupID the group to querry
- * @return bool
- */
- public boolean hasGroup(String groupID);
-
-
- /**Get the system managing the node or {@code null} if there isn't one
- *
- * @return System
- */
- public ISystem getSystem();
-
-
- /** Get the data of one of the TypeGroups the Node supports
- *
- * @param groupID
- * @return
- */
- public Object getData(String groupID);
-
-
- /** Set the group data for the node
- *
- * @param dat
- * @param groupID
- */
- public void setData(Object dat, String groupID);
-
-
- /** Get the nodes that this node is connected to
- *
- * @return Node[]
- */
- public Connection[] getConnections();
-
-
- /** Get the number of nodes that this node is connected to
- *
- * @return int
- */
- public int connectionCount();
-}
diff --git a/src/main/java/net/cshift/transit/network/system/ISystem.java b/src/main/java/net/cshift/transit/network/system/ISystem.java
deleted file mode 100644
index 9e01645..0000000
--- a/src/main/java/net/cshift/transit/network/system/ISystem.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package net.cshift.transit.network.system;
-
-
-/**
- * @author Kyle Gunger
- * @apiNote An ISystem represents a system of nodes which has been optimized for performance. A node can exist on its own, but an ISystem can't exist without a node.
- */
-public interface ISystem
-{
- /**The nodes stored by the system
- *
- * @return INode[]
- */
- public INode[] getNodes();
-}
diff --git a/src/main/java/net/cshift/transit/network/system/swap/IAcceptorNode.java b/src/main/java/net/cshift/transit/network/system/swap/IAcceptorNode.java
deleted file mode 100644
index b64d4cc..0000000
--- a/src/main/java/net/cshift/transit/network/system/swap/IAcceptorNode.java
+++ /dev/null
@@ -1,37 +0,0 @@
-package net.cshift.transit.network.system.swap;
-
-import net.cshift.transit.network.packet.IStaticPacket;
-import net.cshift.transit.network.system.INode;
-
-/**
- * @author Kyle Gunger
- * @apiNote A node which can accept packets of specific types
- */
-public interface IAcceptorNode extends INode
-{
-
- /** Link another node as a provider
- *
- * @param requester The object to be a provider
- * @param group
- * @return
- */
- public boolean linkProvider(IProviderNode requestor, String group);
-
-
- /** Unlink a provider from the acceptor
- *
- * @param requestor
- * @return
- */
- public boolean unlinkProvider(IProviderNode requestor);
-
-
- /** Accept a packet from a provider
- *
- * @param packet
- * @param group
- * @return
- */
- public <T> boolean accept(IStaticPacket<T> packet, String group);
-}
diff --git a/src/main/java/net/cshift/transit/network/system/swap/IProviderNode.java b/src/main/java/net/cshift/transit/network/system/swap/IProviderNode.java
deleted file mode 100644
index 5a3bd80..0000000
--- a/src/main/java/net/cshift/transit/network/system/swap/IProviderNode.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package net.cshift.transit.network.system.swap;
-
-import net.cshift.transit.network.system.INode;
-
-/**
- * @author Kyle Gunger
- * @apiNote A node which can provide packets of specific types
- */
-public interface IProviderNode extends INode{
-
- /** Link another node as an acceptor
- *
- * @param requester The object requesting the Acceptor
- * @param group
- * @return boolean
- */
- public boolean linkAcceptor(IAcceptorNode requestor, String group);
-
-
- /** Unlink a provider from the acceptor
- *
- * @param requestor
- * @return
- */
- public boolean unlinkAcceptor(IAcceptorNode requestor);
-
-}