diff options
Diffstat (limited to 'src/main/java/net/cshift/api/transit/network/packet')
4 files changed, 0 insertions, 113 deletions
diff --git a/src/main/java/net/cshift/api/transit/network/packet/DynamicPacket.java b/src/main/java/net/cshift/api/transit/network/packet/DynamicPacket.java deleted file mode 100644 index 3a57227..0000000 --- a/src/main/java/net/cshift/api/transit/network/packet/DynamicPacket.java +++ /dev/null @@ -1,43 +0,0 @@ -package net.cshift.api.transit.network.packet; - -import net.cshift.api.transit.type.Type; - -/** - * Simple packet which stores a value which can change. - * - * @param <D> The type parameter of the Type being transported - * @author Kyle Gunger - * - */ -public class DynamicPacket<D> implements IDynamicPacket<D> { - private Object data; - private Type<D> type; - - /** Constructor. Stores the given data and uses the given type. - * - * @param dat The packet's data - * @param t The packet's type - */ - public DynamicPacket(Object dat, Type<D> t) - { - data = dat; - type = t; - } - - @Override - public Object getData() - { - return data; - } - - @Override - public void setData(Object dat) - { - data = dat; - } - - @Override - public Type<D> getType() { - return type; - } -} diff --git a/src/main/java/net/cshift/api/transit/network/packet/IDynamicPacket.java b/src/main/java/net/cshift/api/transit/network/packet/IDynamicPacket.java deleted file mode 100644 index 6d80b3b..0000000 --- a/src/main/java/net/cshift/api/transit/network/packet/IDynamicPacket.java +++ /dev/null @@ -1,11 +0,0 @@ -package net.cshift.api.transit.network.packet; - -/** Interface describing a packet where the data can change as it's transferred. - * - * @param <D> The type parameter of the Type being transported - * @author Kyle Gunger - */ -public interface IDynamicPacket<D> extends IStaticPacket<D>{ - /** Set the packet's data. */ - public void setData(Object dat); -} diff --git a/src/main/java/net/cshift/api/transit/network/packet/IStaticPacket.java b/src/main/java/net/cshift/api/transit/network/packet/IStaticPacket.java deleted file mode 100644 index cdad90a..0000000 --- a/src/main/java/net/cshift/api/transit/network/packet/IStaticPacket.java +++ /dev/null @@ -1,23 +0,0 @@ -package net.cshift.api.transit.network.packet; - -import net.cshift.api.transit.type.*; - -/** Interface describing an unchanging packet. - * - * @param <D> The type parameter of the Type being transported - * @author Kyle Gunger - */ -public interface IStaticPacket<D> -{ - /**Get the packet's data. - * - * @return The packet's data - */ - public Object getData(); - - /**Get the packet's type. - * - * @return IType<?> The type of the packet - */ - public Type<D> getType(); -} diff --git a/src/main/java/net/cshift/api/transit/network/packet/StaticPacket.java b/src/main/java/net/cshift/api/transit/network/packet/StaticPacket.java deleted file mode 100644 index 5ffed26..0000000 --- a/src/main/java/net/cshift/api/transit/network/packet/StaticPacket.java +++ /dev/null @@ -1,36 +0,0 @@ -package net.cshift.api.transit.network.packet; - -import net.cshift.api.transit.type.*; - -/** Simple packet which stores an unchanging value. - * @author Kyle Gunger - * - * @param <D> The data type (Object) that the packet transfers. - */ -public class StaticPacket<D> implements IStaticPacket<D> -{ - private Object data; - private Type<D> type; - - /** Constructor. Stores the given data and uses the given type. - * - * @param dat The packet's data - * @param t The packet's type - */ - public StaticPacket(Object dat, Type<D> t) - { - data = dat; - type = t; - } - - @Override - public Object getData() - { - return data; - } - - @Override - public Type<D> getType() { - return type; - } -} |